In the financial fund industry, does green investment generate better performance ?
import requests
from bs4 import BeautifulSoup
import re
import shutil
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
from datetime import datetime
import time
import csv
import os
import pickle
from IPython.display import display, HTML
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import mean_absolute_error as MAE
from sklearn.linear_model import Ridge
from sklearn.metrics import mean_squared_error as MSE
from sklearn.metrics import mean_absolute_error as MAE
from sklearn.linear_model import Ridge
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import SelectKBest, f_regression
from sklearn.ensemble import RandomForestRegressor
from sklearn.tree import export_graphviz
from sklearn.tree import DecisionTreeClassifier
from sklearn import tree
#from sklearn.tree import plot_tree
#pip install dtreeviz
#!pip install graphviz
Requirement already satisfied: graphviz in c:\users\thinkpad\anaconda3\lib\site-packages (0.20.1)
#import graphviz
from sklearn.neighbors import KNeighborsRegressor
!pip install tensorflow
Requirement already satisfied: tensorflow in c:\users\thinkpad\anaconda3\lib\site-packages (2.9.1) Requirement already satisfied: absl-py>=1.0.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.2.0) Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.47.0) Requirement already satisfied: wrapt>=1.11.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.12.1) Requirement already satisfied: protobuf<3.20,>=3.9.2 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (3.19.4) Requirement already satisfied: keras<2.10.0,>=2.9.0rc0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (2.9.0) Requirement already satisfied: flatbuffers<2,>=1.12 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.12) Requirement already satisfied: typing-extensions>=3.6.6 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (3.10.0.2) Requirement already satisfied: libclang>=13.0.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (14.0.6) Requirement already satisfied: packaging in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (21.0) Requirement already satisfied: tensorflow-estimator<2.10.0,>=2.9.0rc0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (2.9.0) Requirement already satisfied: termcolor>=1.1.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.1.0) Requirement already satisfied: gast<=0.4.0,>=0.2.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (0.4.0) Requirement already satisfied: setuptools in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (58.0.4) Requirement already satisfied: tensorboard<2.10,>=2.9 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (2.9.1) Requirement already satisfied: numpy>=1.20 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.20.3) Requirement already satisfied: astunparse>=1.6.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.6.3) Requirement already satisfied: h5py>=2.9.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (3.2.1) Requirement already satisfied: google-pasta>=0.1.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (0.2.0) Requirement already satisfied: keras-preprocessing>=1.1.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.1.2) Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (3.3.0) Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (0.26.0) Requirement already satisfied: six>=1.12.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorflow) (1.16.0) Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from astunparse>=1.6.0->tensorflow) (0.37.0) Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (1.8.1) Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (0.6.1) Requirement already satisfied: requests<3,>=2.21.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (2.26.0) Requirement already satisfied: google-auth<3,>=1.6.3 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (2.9.1) Requirement already satisfied: markdown>=2.6.8 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (3.4.1) Requirement already satisfied: werkzeug>=1.0.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (2.0.2) Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from tensorboard<2.10,>=2.9->tensorflow) (0.4.6) Requirement already satisfied: cachetools<6.0,>=2.0.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow) (5.2.0) Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow) (0.2.8) Requirement already satisfied: rsa<5,>=3.1.4 in c:\users\thinkpad\anaconda3\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow) (4.9) Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.10,>=2.9->tensorflow) (1.3.1) Requirement already satisfied: importlib-metadata>=4.4 in c:\users\thinkpad\anaconda3\lib\site-packages (from markdown>=2.6.8->tensorboard<2.10,>=2.9->tensorflow) (4.8.1) Requirement already satisfied: zipp>=0.5 in c:\users\thinkpad\anaconda3\lib\site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<2.10,>=2.9->tensorflow) (3.6.0) Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\users\thinkpad\anaconda3\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.10,>=2.9->tensorflow) (0.4.8) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\thinkpad\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.10,>=2.9->tensorflow) (1.26.7) Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.10,>=2.9->tensorflow) (2.0.4) Requirement already satisfied: certifi>=2017.4.17 in c:\users\thinkpad\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.10,>=2.9->tensorflow) (2022.6.15) Requirement already satisfied: idna<4,>=2.5 in c:\users\thinkpad\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.10,>=2.9->tensorflow) (3.2) Requirement already satisfied: oauthlib>=3.0.0 in c:\users\thinkpad\anaconda3\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.10,>=2.9->tensorflow) (3.2.0) Requirement already satisfied: pyparsing>=2.0.2 in c:\users\thinkpad\anaconda3\lib\site-packages (from packaging->tensorflow) (3.0.4)
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.layers import Dense, Activation, Flatten
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_error
from tensorflow.keras.wrappers.scikit_learn import KerasRegressor # There is also a KerasClassifier class
from sklearn.model_selection import RandomizedSearchCV, KFold
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
!pip install openpyxl
import openpyxl
print("Library versions: pandas", pd.__version__," numpy", np.__version__," seaborn", sns.__version__)
Requirement already satisfied: openpyxl in c:\users\thinkpad\anaconda3\lib\site-packages (3.0.9) Requirement already satisfied: et-xmlfile in c:\users\thinkpad\anaconda3\lib\site-packages (from openpyxl) (1.1.0) Library versions: pandas 1.3.4 numpy 1.20.3 seaborn 0.11.2
def download_data():
URL = 'https://fossilfreefunds.org/how-it-works'
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
urls = []
names = []
for i, link in enumerate(soup.findAll('a')):
FULLURL = link.get('href')
if bool(re.search('.*results.*.xlsx', FULLURL)):
urls.append(FULLURL)
names.append(os.path.basename(soup.select('a')[i].attrs['href']))
names_urls = zip(names, urls)
print(names_urls)
for name, url in names_urls:
print("Download file: "+name)
r = requests.get(url, verify=False,stream=True)
r.raw.decode_content = True
with open("~/Downloads/ESG_2022/" + name, 'wb') as out:
shutil.copyfileobj(r.raw, out)
def merge_excel():
df = pd.DataFrame()
files=os.listdir('data')
files_xls = [f for f in files if f[-4:]=='xlsx']
for f in files_xls:
if not re.match(r".*20210[5-9]+.*", f):
print('Merging file: '+f)
data = pd.read_excel('data/'+f, 'Shareclasses',engine='openpyxl')
df = df.append(data)
#df.to_csv('/kaggle/working/fossilfund_dataset.csv', index=False)
df.to_csv('~/Downloads/ESG2022/fossilfund_dataset.csv', index=False)
print('Export to data/fossilfund_dataset.csv is finished')
#No download ncessary for this notebook, use of Kaggle dataset directly
#if not os.path.exists('data'):
# os.makedirs('data')
# download_data()
# merge_excel()
import os
os.chdir("C:/Users/Thinkpad/Downloads/ESG2022")
df = pd.read_csv('~/Downloads/ESG2022/fossilfund_dataset.csv', engine='python')
#df = pd.read_csv("fossilfund_dataset.csv", engine='python')
df = pd.read_csv('~/Downloads/fossilfund_dataset.csv')
print("Total no. of columns in the dataframe", len(df.columns))
print("No. of columns containing null values", len(df.columns[df.isna().any()]))
print("No. of columns not containing null values", len(df.columns[df.notna().all()]))
print("No. of numerical columns ", len(df.select_dtypes(np.number).columns))
print("Total no. of rows in the dataframe", len(df))
Total no. of columns in the dataframe 121 No. of columns containing null values 41 No. of columns not containing null values 80 No. of numerical columns 101 Total no. of rows in the dataframe 110510
df.info(max_cols=200)
<class 'pandas.core.frame.DataFrame'> RangeIndex: 110510 entries, 0 to 110509 Data columns (total 121 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Fund profile: Shareclass name 110510 non-null object 1 Fund profile: Ticker 108086 non-null object 2 Fund profile: Fund name 110510 non-null object 3 Fund profile: Asset manager 110510 non-null object 4 Fund profile: Shareclass type 110510 non-null object 5 Fund profile: Shareclass inception date 110510 non-null object 6 Fund profile: Category group 110510 non-null object 7 Fund profile: Sustainability mandate 22803 non-null object 8 Fund profile: US-SIF member 1707 non-null object 9 Fund profile: Oldest shareclass inception date 110510 non-null object 10 Fund profile: Shareclass tickers 108403 non-null object 11 Fund profile: Portfolio holdings as-of date 110510 non-null object 12 Fund profile: Fund net assets 110510 non-null int64 13 Fund profile: Percent rated 110510 non-null float64 14 Fossil Free Funds: Fossil fuel grade 110505 non-null object 15 Fossil Free Funds: Fossil fuel holdings, count 110510 non-null int64 16 Fossil Free Funds: Fossil fuel holdings, weight 110510 non-null float64 17 Fossil Free Funds: Fossil fuel holdings, asset 110510 non-null int64 18 Fossil Free Funds: Carbon Underground 200, count 110510 non-null int64 19 Fossil Free Funds: Carbon Underground 200, weight 110510 non-null float64 20 Fossil Free Funds: Carbon Underground 200, asset 110510 non-null int64 21 Fossil Free Funds: Coal industry, count 110510 non-null int64 22 Fossil Free Funds: Coal industry, weight 110510 non-null float64 23 Fossil Free Funds: Coal industry, asset 110510 non-null int64 24 Fossil Free Funds: Oil / gas industry, count 110510 non-null int64 25 Fossil Free Funds: Oil / gas industry, weight 110510 non-null float64 26 Fossil Free Funds: Oil / gas industry, asset 110510 non-null int64 27 Fossil Free Funds: Macroclimate 30 coal-fired utilities, count 110510 non-null int64 28 Fossil Free Funds: Macroclimate 30 coal-fired utilities, weight 110510 non-null float64 29 Fossil Free Funds: Macroclimate 30 coal-fired utilities, asset 110510 non-null int64 30 Fossil Free Funds: Fossil-fired utilities, count 110510 non-null int64 31 Fossil Free Funds: Fossil-fired utilities, weight 110510 non-null float64 32 Fossil Free Funds: Fossil-fired utilities, asset 110510 non-null int64 33 Fossil Free Funds: Relative carbon footprint (tonnes CO2 / $1M USD invested) 110510 non-null float64 34 Fossil Free Funds: Relative carbon intensity (tonnes CO2 / $1M USD revenue) 110510 non-null float64 35 Fossil Free Funds: Total financed emissions scope 1 + 2 (tCO2e) 110510 non-null float64 36 Fossil Free Funds: Total financed emissions scope 1 + 2 + 3 (tCO2e) 110510 non-null float64 37 Fossil Free Funds: Carbon footprint portfolio coverage by market value weight 110510 non-null float64 38 Fossil Free Funds: Carbon footprint portfolio coverage by number of disclosing titles 110510 non-null float64 39 Fossil Free Funds: Clean200, count 110510 non-null int64 40 Fossil Free Funds: Clean200, weight 110510 non-null float64 41 Fossil Free Funds: Clean200, asset 110510 non-null int64 42 Deforestation Free Funds: Deforestation grade 110510 non-null object 43 Deforestation Free Funds: Deforestation-risk producer, count 110510 non-null int64 44 Deforestation Free Funds: Deforestation-risk producer, weight 110510 non-null float64 45 Deforestation Free Funds: Deforestation-risk producer, asset 110510 non-null int64 46 Deforestation Free Funds: Deforestation-risk financier, count 110510 non-null int64 47 Deforestation Free Funds: Deforestation-risk financier, weight 110510 non-null float64 48 Deforestation Free Funds: Deforestation-risk financier, asset 110510 non-null int64 49 Deforestation Free Funds: Deforestation-risk consumer brand, count 110510 non-null int64 50 Deforestation Free Funds: Deforestation-risk consumer brand, weight 110510 non-null float64 51 Deforestation Free Funds: Deforestation-risk consumer brand, asset 110510 non-null int64 52 Gender Equality Funds: Gender equality grade 106250 non-null object 53 Gender Equality Funds: Gender equality group ranking 107248 non-null float64 54 Gender Equality Funds: Gender equality score (out of 100 points) 55648 non-null float64 55 Gender Equality Funds: Gender equality score, gender balance (out of 100 points) 55648 non-null float64 56 Gender Equality Funds: Gender equality score, gender policies (out of 100 points) 55648 non-null float64 57 Gender Equality Funds: Count of holdings with Equileap gender equality scores 110510 non-null int64 58 Gender Equality Funds: Weight of holdings with Equileap gender equality scores 110510 non-null float64 59 Gun Free Funds: Civilian firearm grade 110510 non-null object 60 Gun Free Funds: Civilian firearm, count 110510 non-null int64 61 Gun Free Funds: Civilian firearm, weight 110510 non-null float64 62 Gun Free Funds: Civilian firearm, asset 110510 non-null int64 63 Gun Free Funds: Gun manufacturer, count 110510 non-null int64 64 Gun Free Funds: Gun manufacturer, weight 110510 non-null float64 65 Gun Free Funds: Gun manufacturer, asset 110510 non-null int64 66 Gun Free Funds: Gun retailer, count 110510 non-null int64 67 Gun Free Funds: Gun retailer, weight 110510 non-null float64 68 Gun Free Funds: Gun retailer, asset 110510 non-null int64 69 Weapon Free Funds: Military weapon grade 110510 non-null object 70 Weapon Free Funds: Military weapon, count 110510 non-null int64 71 Weapon Free Funds: Military weapon, weight 110510 non-null float64 72 Weapon Free Funds: Military weapon, asset 110510 non-null int64 73 Weapon Free Funds: Major military contractors, count 110510 non-null int64 74 Weapon Free Funds: Major military contractors, weight 110510 non-null float64 75 Weapon Free Funds: Major military contractors, asset 110510 non-null int64 76 Weapon Free Funds: Nuclear weapons, count 110510 non-null int64 77 Weapon Free Funds: Nuclear weapons, weight 110510 non-null float64 78 Weapon Free Funds: Nuclear weapons, asset 110510 non-null int64 79 Weapon Free Funds: Cluster munitions / landmines, count 110510 non-null int64 80 Weapon Free Funds: Cluster munitions / landmines, weight 110510 non-null float64 81 Weapon Free Funds: Cluster munitions / landmines, asset 110510 non-null int64 82 Tobacco Free Funds: Tobacco grade 110510 non-null object 83 Tobacco Free Funds: Tobacco producer, count 110510 non-null int64 84 Tobacco Free Funds: Tobacco producer, weight 110510 non-null float64 85 Tobacco Free Funds: Tobacco producer, asset 110510 non-null int64 86 Tobacco Free Funds: Tobacco-promoting entertainment company, count 110510 non-null int64 87 Tobacco Free Funds: Tobacco-promoting entertainment company, weight 110510 non-null float64 88 Tobacco Free Funds: Tobacco-promoting entertainment company, asset 110510 non-null int64 89 Financial performance: Financial performance as-of date 110510 non-null object 90 Financial performance: Month end trailing returns, year 1 108367 non-null float64 91 Financial performance: Month end trailing returns, year 3 103448 non-null float64 92 Financial performance: Month end trailing returns, year 5 96542 non-null float64 93 Financial performance: Month end trailing returns, year 10 81748 non-null float64 94 Prison Free Funds: Prison industrial complex grade 73327 non-null object 95 Prison Free Funds: All flagged, count 73327 non-null float64 96 Prison Free Funds: All flagged, weight 73327 non-null float64 97 Prison Free Funds: All flagged, asset 73327 non-null float64 98 Prison Free Funds: Prison industry, count 73327 non-null float64 99 Prison Free Funds: Prison industry, weight 73327 non-null float64 100 Prison Free Funds: Prison industry, asset 73327 non-null float64 101 Prison Free Funds: Border industry, count 73327 non-null float64 102 Prison Free Funds: Border industry, weight 73327 non-null float64 103 Prison Free Funds: Border industry, asset 73327 non-null float64 104 Prison Free Funds: All flagged, higher risk, count 73327 non-null float64 105 Prison Free Funds: All flagged, higher risk, weight 73327 non-null float64 106 Prison Free Funds: All flagged, higher risk, asset 73327 non-null float64 107 Prison Free Funds: Prison industry, higher risk, count 73327 non-null float64 108 Prison Free Funds: Prison industry, higher risk, weight 73327 non-null float64 109 Prison Free Funds: Prison industry, higher risk, asset 73327 non-null float64 110 Prison Free Funds: Border industry, higher risk, count 73327 non-null float64 111 Prison Free Funds: Border industry, higher risk, weight 73327 non-null float64 112 Prison Free Funds: Border industry, higher risk, asset 73327 non-null float64 113 Prison Free Funds: Private prison operators, count 73327 non-null float64 114 Prison Free Funds: Private prison operators, weight 73327 non-null float64 115 Prison Free Funds: Private prison operators, asset 73327 non-null float64 116 Gender Equality Funds: Gender equality score - Overall score (out of 100 points) 54602 non-null float64 117 Gender Equality Funds: Gender equality score - Gender balance in leadership and workforce (out of 40 points) 54602 non-null float64 118 Gender Equality Funds: Gender equality score - Equal compensation and work life balance (out of 30 points) 54602 non-null float64 119 Gender Equality Funds: Gender equality score - Policies promoting gender equality (out of 20 points) 54602 non-null float64 120 Gender Equality Funds: Gender equality score - Commitment, transparency, and accountability (out of 10 points) 54602 non-null float64 dtypes: float64(61), int64(40), object(20) memory usage: 102.0+ MB
date_cols=df.filter(regex=" date.*",axis=1).columns
df[date_cols]=df[date_cols].apply(pd.to_datetime, errors='coerce')
df[date_cols]
| Fund profile: Shareclass inception date | Fund profile: Oldest shareclass inception date | Fund profile: Portfolio holdings as-of date | Financial performance: Financial performance as-of date | |
|---|---|---|---|---|
| 0 | 2014-11-12 | 2014-11-12 | 2020-01-31 | 2020-03-31 |
| 1 | 2014-11-12 | 2014-11-12 | 2020-01-31 | 2020-03-31 |
| 2 | 2014-11-12 | 2014-11-12 | 2020-01-31 | 2020-03-31 |
| 3 | 2014-11-12 | 2014-11-12 | 2020-01-31 | 2020-03-31 |
| 4 | 2011-12-28 | 2011-12-28 | 2019-12-31 | 2020-03-31 |
| ... | ... | ... | ... | ... |
| 110505 | 2018-12-04 | 2018-12-04 | 2021-02-28 | 2021-02-28 |
| 110506 | 2018-09-05 | 2018-09-05 | 2021-02-28 | 2021-02-28 |
| 110507 | 2018-12-04 | 2018-12-04 | 2021-02-28 | 2021-02-28 |
| 110508 | 2019-03-06 | 2019-03-06 | 2021-02-28 | 2021-02-28 |
| 110509 | 2019-06-25 | 2019-06-25 | 2021-02-28 | 2021-02-28 |
110510 rows × 4 columns
display(HTML(df[0:10].to_html()))
| Fund profile: Shareclass name | Fund profile: Ticker | Fund profile: Fund name | Fund profile: Asset manager | Fund profile: Shareclass type | Fund profile: Shareclass inception date | Fund profile: Category group | Fund profile: Sustainability mandate | Fund profile: US-SIF member | Fund profile: Oldest shareclass inception date | Fund profile: Shareclass tickers | Fund profile: Portfolio holdings as-of date | Fund profile: Fund net assets | Fund profile: Percent rated | Fossil Free Funds: Fossil fuel grade | Fossil Free Funds: Fossil fuel holdings, count | Fossil Free Funds: Fossil fuel holdings, weight | Fossil Free Funds: Fossil fuel holdings, asset | Fossil Free Funds: Carbon Underground 200, count | Fossil Free Funds: Carbon Underground 200, weight | Fossil Free Funds: Carbon Underground 200, asset | Fossil Free Funds: Coal industry, count | Fossil Free Funds: Coal industry, weight | Fossil Free Funds: Coal industry, asset | Fossil Free Funds: Oil / gas industry, count | Fossil Free Funds: Oil / gas industry, weight | Fossil Free Funds: Oil / gas industry, asset | Fossil Free Funds: Macroclimate 30 coal-fired utilities, count | Fossil Free Funds: Macroclimate 30 coal-fired utilities, weight | Fossil Free Funds: Macroclimate 30 coal-fired utilities, asset | Fossil Free Funds: Fossil-fired utilities, count | Fossil Free Funds: Fossil-fired utilities, weight | Fossil Free Funds: Fossil-fired utilities, asset | Fossil Free Funds: Relative carbon footprint (tonnes CO2 / $1M USD invested) | Fossil Free Funds: Relative carbon intensity (tonnes CO2 / $1M USD revenue) | Fossil Free Funds: Total financed emissions scope 1 + 2 (tCO2e) | Fossil Free Funds: Total financed emissions scope 1 + 2 + 3 (tCO2e) | Fossil Free Funds: Carbon footprint portfolio coverage by market value weight | Fossil Free Funds: Carbon footprint portfolio coverage by number of disclosing titles | Fossil Free Funds: Clean200, count | Fossil Free Funds: Clean200, weight | Fossil Free Funds: Clean200, asset | Deforestation Free Funds: Deforestation grade | Deforestation Free Funds: Deforestation-risk producer, count | Deforestation Free Funds: Deforestation-risk producer, weight | Deforestation Free Funds: Deforestation-risk producer, asset | Deforestation Free Funds: Deforestation-risk financier, count | Deforestation Free Funds: Deforestation-risk financier, weight | Deforestation Free Funds: Deforestation-risk financier, asset | Deforestation Free Funds: Deforestation-risk consumer brand, count | Deforestation Free Funds: Deforestation-risk consumer brand, weight | Deforestation Free Funds: Deforestation-risk consumer brand, asset | Gender Equality Funds: Gender equality grade | Gender Equality Funds: Gender equality group ranking | Gender Equality Funds: Gender equality score (out of 100 points) | Gender Equality Funds: Gender equality score, gender balance (out of 100 points) | Gender Equality Funds: Gender equality score, gender policies (out of 100 points) | Gender Equality Funds: Count of holdings with Equileap gender equality scores | Gender Equality Funds: Weight of holdings with Equileap gender equality scores | Gun Free Funds: Civilian firearm grade | Gun Free Funds: Civilian firearm, count | Gun Free Funds: Civilian firearm, weight | Gun Free Funds: Civilian firearm, asset | Gun Free Funds: Gun manufacturer, count | Gun Free Funds: Gun manufacturer, weight | Gun Free Funds: Gun manufacturer, asset | Gun Free Funds: Gun retailer, count | Gun Free Funds: Gun retailer, weight | Gun Free Funds: Gun retailer, asset | Weapon Free Funds: Military weapon grade | Weapon Free Funds: Military weapon, count | Weapon Free Funds: Military weapon, weight | Weapon Free Funds: Military weapon, asset | Weapon Free Funds: Major military contractors, count | Weapon Free Funds: Major military contractors, weight | Weapon Free Funds: Major military contractors, asset | Weapon Free Funds: Nuclear weapons, count | Weapon Free Funds: Nuclear weapons, weight | Weapon Free Funds: Nuclear weapons, asset | Weapon Free Funds: Cluster munitions / landmines, count | Weapon Free Funds: Cluster munitions / landmines, weight | Weapon Free Funds: Cluster munitions / landmines, asset | Tobacco Free Funds: Tobacco grade | Tobacco Free Funds: Tobacco producer, count | Tobacco Free Funds: Tobacco producer, weight | Tobacco Free Funds: Tobacco producer, asset | Tobacco Free Funds: Tobacco-promoting entertainment company, count | Tobacco Free Funds: Tobacco-promoting entertainment company, weight | Tobacco Free Funds: Tobacco-promoting entertainment company, asset | Financial performance: Financial performance as-of date | Financial performance: Month end trailing returns, year 1 | Financial performance: Month end trailing returns, year 3 | Financial performance: Month end trailing returns, year 5 | Financial performance: Month end trailing returns, year 10 | Prison Free Funds: Prison industrial complex grade | Prison Free Funds: All flagged, count | Prison Free Funds: All flagged, weight | Prison Free Funds: All flagged, asset | Prison Free Funds: Prison industry, count | Prison Free Funds: Prison industry, weight | Prison Free Funds: Prison industry, asset | Prison Free Funds: Border industry, count | Prison Free Funds: Border industry, weight | Prison Free Funds: Border industry, asset | Prison Free Funds: All flagged, higher risk, count | Prison Free Funds: All flagged, higher risk, weight | Prison Free Funds: All flagged, higher risk, asset | Prison Free Funds: Prison industry, higher risk, count | Prison Free Funds: Prison industry, higher risk, weight | Prison Free Funds: Prison industry, higher risk, asset | Prison Free Funds: Border industry, higher risk, count | Prison Free Funds: Border industry, higher risk, weight | Prison Free Funds: Border industry, higher risk, asset | Prison Free Funds: Private prison operators, count | Prison Free Funds: Private prison operators, weight | Prison Free Funds: Private prison operators, asset | Gender Equality Funds: Gender equality score - Overall score (out of 100 points) | Gender Equality Funds: Gender equality score - Gender balance in leadership and workforce (out of 40 points) | Gender Equality Funds: Gender equality score - Equal compensation and work life balance (out of 30 points) | Gender Equality Funds: Gender equality score - Policies promoting gender equality (out of 20 points) | Gender Equality Funds: Gender equality score - Commitment, transparency, and accountability (out of 10 points) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1290 SmartBeta Equity A | TNBRX | 1290 SmartBeta Equity Fund | 1290 Funds | Open-end mutual fund | 2014-11-12 | International Equity Funds | Y | NaN | 2014-11-12 | TNBAX, TNBCX, TNBIX, TNBRX | 2020-01-31 | 32236053 | 0.981064 | C | 29 | 0.058496 | 1885672 | 9 | 0.012004 | 386964 | 6 | 0.007012 | 226046 | 7 | 0.009908 | 319401 | 4 | 0.012576 | 405407 | 20 | 0.046546 | 1500469 | 56.19 | 104.21 | 1846.27 | 5965.91 | 0.981044 | 0.844560 | 43 | 0.121765 | 3925214 | F | 5 | 0.005136 | 165572 | 9 | 0.016941 | 546125 | 46 | 0.149024 | 4803941 | A | 85.0 | 57.0 | 48.0 | 78.0 | 384 | 0.981064 | B | 1 | 0.001776 | 57245 | 0 | 0.0 | 0 | 1 | 0.001776 | 57245 | F | 13 | 0.035266 | 1136849 | 13 | 0.035266 | 1136849 | 7 | 0.025614 | 825707 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 2 | 0.009434 | 304115 | 2020-03-31 | -7.74546 | 3.45056 | 4.32708 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 1 | 1290 SmartBeta Equity I | TNBRX | 1290 SmartBeta Equity Fund | 1290 Funds | Open-end mutual fund | 2014-11-12 | International Equity Funds | Y | NaN | 2014-11-12 | TNBAX, TNBCX, TNBIX, TNBRX | 2020-01-31 | 32236053 | 0.981064 | C | 29 | 0.058496 | 1885672 | 9 | 0.012004 | 386964 | 6 | 0.007012 | 226046 | 7 | 0.009908 | 319401 | 4 | 0.012576 | 405407 | 20 | 0.046546 | 1500469 | 56.19 | 104.21 | 1846.27 | 5965.91 | 0.981044 | 0.844560 | 43 | 0.121765 | 3925214 | F | 5 | 0.005136 | 165572 | 9 | 0.016941 | 546125 | 46 | 0.149024 | 4803941 | A | 85.0 | 57.0 | 48.0 | 78.0 | 384 | 0.981064 | B | 1 | 0.001776 | 57245 | 0 | 0.0 | 0 | 1 | 0.001776 | 57245 | F | 13 | 0.035266 | 1136849 | 13 | 0.035266 | 1136849 | 7 | 0.025614 | 825707 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 2 | 0.009434 | 304115 | 2020-03-31 | -7.50301 | 3.69803 | 4.58249 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 2 | 1290 SmartBeta Equity R | TNBRX | 1290 SmartBeta Equity Fund | 1290 Funds | Open-end mutual fund | 2014-11-12 | International Equity Funds | Y | NaN | 2014-11-12 | TNBAX, TNBCX, TNBIX, TNBRX | 2020-01-31 | 32236053 | 0.981064 | C | 29 | 0.058496 | 1885672 | 9 | 0.012004 | 386964 | 6 | 0.007012 | 226046 | 7 | 0.009908 | 319401 | 4 | 0.012576 | 405407 | 20 | 0.046546 | 1500469 | 56.19 | 104.21 | 1846.27 | 5965.91 | 0.981044 | 0.844560 | 43 | 0.121765 | 3925214 | F | 5 | 0.005136 | 165572 | 9 | 0.016941 | 546125 | 46 | 0.149024 | 4803941 | A | 85.0 | 57.0 | 48.0 | 78.0 | 384 | 0.981064 | B | 1 | 0.001776 | 57245 | 0 | 0.0 | 0 | 1 | 0.001776 | 57245 | F | 13 | 0.035266 | 1136849 | 13 | 0.035266 | 1136849 | 7 | 0.025614 | 825707 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 2 | 0.009434 | 304115 | 2020-03-31 | -7.97413 | 3.16886 | 4.04976 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 3 | 1290 SmartBeta Equity T | TNBRX | 1290 SmartBeta Equity Fund | 1290 Funds | Open-end mutual fund | 2014-11-12 | International Equity Funds | Y | NaN | 2014-11-12 | TNBAX, TNBCX, TNBIX, TNBRX | 2020-01-31 | 32236053 | 0.981064 | C | 29 | 0.058496 | 1885672 | 9 | 0.012004 | 386964 | 6 | 0.007012 | 226046 | 7 | 0.009908 | 319401 | 4 | 0.012576 | 405407 | 20 | 0.046546 | 1500469 | 56.19 | 104.21 | 1846.27 | 5965.91 | 0.981044 | 0.844560 | 43 | 0.121765 | 3925214 | F | 5 | 0.005136 | 165572 | 9 | 0.016941 | 546125 | 46 | 0.149024 | 4803941 | A | 85.0 | 57.0 | 48.0 | 78.0 | 384 | 0.981064 | B | 1 | 0.001776 | 57245 | 0 | 0.0 | 0 | 1 | 0.001776 | 57245 | F | 13 | 0.035266 | 1136849 | 13 | 0.035266 | 1136849 | 7 | 0.025614 | 825707 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 2 | 0.009434 | 304115 | 2020-03-31 | -7.52837 | 3.68855 | 4.57675 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 4 | 13D Activist A | DDDCX | 13D Activist Fund | 13D Activist Fund | Open-end mutual fund | 2011-12-28 | U.S. Equity Fund | Y | NaN | 2011-12-28 | DDDAX, DDDCX, DDDIX | 2019-12-31 | 346536813 | 0.806360 | B | 1 | 0.037922 | 13141409 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 1 | 0.037922 | 13141409 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 59.52 | 63.08 | 25580.25 | 104767.63 | 0.806359 | 0.333333 | 2 | 0.072099 | 24984957 | B | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 3 | 0.107243 | 37163476 | D | 30.0 | 37.0 | 28.0 | 57.0 | 22 | 0.806360 | A | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | A | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | 2020-03-31 | -23.01826 | -3.84150 | -1.04910 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 5 | 13D Activist C | DDDCX | 13D Activist Fund | 13D Activist Fund | Open-end mutual fund | 2012-12-11 | U.S. Equity Fund | Y | NaN | 2011-12-28 | DDDAX, DDDCX, DDDIX | 2019-12-31 | 346536813 | 0.806360 | B | 1 | 0.037922 | 13141409 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 1 | 0.037922 | 13141409 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 59.52 | 63.08 | 25580.25 | 104767.63 | 0.806359 | 0.333333 | 2 | 0.072099 | 24984957 | B | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 3 | 0.107243 | 37163476 | D | 30.0 | 37.0 | 28.0 | 57.0 | 22 | 0.806360 | A | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | A | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | 2020-03-31 | -23.58117 | -4.55839 | -1.78225 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 6 | 13D Activist I | DDDCX | 13D Activist Fund | 13D Activist Fund | Open-end mutual fund | 2011-12-28 | U.S. Equity Fund | Y | NaN | 2011-12-28 | DDDAX, DDDCX, DDDIX | 2019-12-31 | 346536813 | 0.806360 | B | 1 | 0.037922 | 13141409 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 1 | 0.037922 | 13141409 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 59.52 | 63.08 | 25580.25 | 104767.63 | 0.806359 | 0.333333 | 2 | 0.072099 | 24984957 | B | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 3 | 0.107243 | 37163476 | D | 30.0 | 37.0 | 28.0 | 57.0 | 22 | 0.806360 | A | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | A | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | 2020-03-31 | -22.83109 | -3.60780 | -0.80303 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 7 | 1919 Socially Responsive Balanced A | LMRNX | 1919 Socially Responsive Balanced Fund | 1919 Funds | Open-end mutual fund | 1992-11-06 | Allocation Funds | Y | Y | 1992-11-06 | LMRNX, SESLX, SSIAX | 2019-12-31 | 228010406 | 0.631210 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 15.01 | 38.60 | 5420.70 | 13702.81 | 0.631208 | 0.837209 | 5 | 0.077585 | 17690203 | B | 0 | 0.000000 | 0 | 1 | 0.013227 | 3015889 | 7 | 0.113257 | 25823739 | B | 75.0 | 58.0 | 49.0 | 77.0 | 42 | 0.631210 | A | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 1 | 0.005460 | 1244893 | 2020-03-31 | 0.00352 | 7.13438 | 5.35168 | 7.10618 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 8 | 1919 Socially Responsive Balanced C | LMRNX | 1919 Socially Responsive Balanced Fund | 1919 Funds | Open-end mutual fund | 1993-05-05 | Allocation Funds | Y | Y | 1992-11-06 | LMRNX, SESLX, SSIAX | 2019-12-31 | 228010406 | 0.631210 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 15.01 | 38.60 | 5420.70 | 13702.81 | 0.631208 | 0.837209 | 5 | 0.077585 | 17690203 | B | 0 | 0.000000 | 0 | 1 | 0.013227 | 3015889 | 7 | 0.113257 | 25823739 | B | 75.0 | 58.0 | 49.0 | 77.0 | 42 | 0.631210 | A | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 1 | 0.005460 | 1244893 | 2020-03-31 | -0.65016 | 6.37131 | 4.59848 | 6.37344 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 9 | 1919 Socially Responsive Balanced I | LMRNX | 1919 Socially Responsive Balanced Fund | 1919 Funds | Open-end mutual fund | 2008-07-24 | Allocation Funds | Y | Y | 1992-11-06 | LMRNX, SESLX, SSIAX | 2019-12-31 | 228010406 | 0.631210 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 15.01 | 38.60 | 5420.70 | 13702.81 | 0.631208 | 0.837209 | 5 | 0.077585 | 17690203 | B | 0 | 0.000000 | 0 | 1 | 0.013227 | 3015889 | 7 | 0.113257 | 25823739 | B | 75.0 | 58.0 | 49.0 | 77.0 | 42 | 0.631210 | A | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | 0 | 0.000000 | 0 | A | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.000000 | 0 | 0 | 0.0 | 0 | B | 0 | 0.0 | 0 | 1 | 0.005460 | 1244893 | 2020-03-31 | 0.37831 | 7.46544 | 5.65125 | 7.39492 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
Detailed breakdown by categories:
So we have a wide range of data information for each fund classification category: from overall category grades to the detailed breakdown of each category
We can have more information provided by FFF about each feature description in the "Key" Excel sheet provided by FFF:
#key_df=pd.read_excel('/kaggle/input/fossil-free-funds/raw/InvestYourValuesshareclassresults20200716.xlsx', 'Key', engine='openpyxl', header=None, names=['Category', 'Feature', 'Description'])
key_df=pd.read_excel('~/Downloads/InvestYourValuesshareclassresults20200716.xlsx', 'Key', engine='openpyxl', header=None, names=['Category', 'Feature', 'Description'])
s = key_df.style.set_properties(**{'text-align': 'left'})
display(HTML(s.render()))
#display(HTML(key_df.to_html(index=False)))
| Category | Feature | Description | |
|---|---|---|---|
| 0 | Fund profile | Shareclass name | Name of the shareclass. |
| 1 | Fund profile | Ticker | Ticker of the shareclass. |
| 2 | Fund profile | Fund name | Name of the mutual fund or ETF. |
| 3 | Fund profile | Asset manager | The asset manager that offers this shareclass. |
| 4 | Fund profile | Shareclass type | Type of shareclass, either open-end fund or exchange-traded fund (ETF). |
| 5 | Fund profile | Shareclass inception date | The date of inception of this shareclass. |
| 6 | Fund profile | Category group | The category group this fund is assigned to, based on its portfolio investment profile. |
| 7 | Fund profile | Sustainability mandate | "Y" if this fund has a sustainability mandate. |
| 8 | Fund profile | US-SIF member | "Y" if this fund is a member of The Forum for Sustainable and Responsible Investing, also known as US-SIF. |
| 9 | Fund profile | Oldest shareclass inception date | The oldest date of inception for any shareclass for this fund. |
| 10 | Fund profile | Shareclass tickers | The tickers of any other open-end or exchange-traded shareclasses offered for this fund. |
| 11 | Fund profile | Portfolio holdings as-of date | The date the portfolio holdings were reported by the fund manager. |
| 12 | Fund profile | Fund net assets | The amount of fund assets, as calculated using the market value of the holdings of the portfolio, as of the portfolio holdings date. |
| 13 | Fund profile | Percent rated | The percent of fund assets rated by Invest Your Values. Our methodology is restricted to long-position equities, so "percent rated" is approximate to the percent of fund assets invested directly in stocks. |
| 14 | Fossil Free Funds | Fossil fuel grade | The fossil fuel grade for this fund, based on total fossil fuel exposure. Learn more at https://fossilfreefunds.org/how-it-works. |
| 15 | Fossil Free Funds | Fossil fuel holdings, count | The number of holdings in this fund's portfolio found on the five fossil fuel screen lists. Learn more at https://fossilfreefunds.org/how-it-works. |
| 16 | Fossil Free Funds | Fossil fuel holdings, weight | The percent of fund assets invested in holdings found on the five fossil fuel screen lists. Learn more at https://fossilfreefunds.org/how-it-works. |
| 17 | Fossil Free Funds | Fossil fuel holdings, asset | The amount in USD of fund assets invested in holdings found on the five fossil fuel screen lists. Learn more at https://fossilfreefunds.org/how-it-works. |
| 18 | Fossil Free Funds | Carbon Underground 200, count | The number of holdings in this fund's portfolio found on the Carbon Underground 200 screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 19 | Fossil Free Funds | Carbon Underground 200, weight | The percent of fund assets invested in holdings found on the Carbon Underground 200 screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 20 | Fossil Free Funds | Carbon Underground 200, asset | The amount in USD of fund assets invested in holdings found on the Carbon Underground 200 screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 21 | Fossil Free Funds | Coal industry, count | The number of holdings in this fund's portfolio found on the coal industry screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 22 | Fossil Free Funds | Coal industry, weight | The percent of fund assets invested in holdings found on the coal industry screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 23 | Fossil Free Funds | Coal industry, asset | The amount in USD of fund assets invested in holdings found on the coal industry screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 24 | Fossil Free Funds | Oil / gas industry, count | The number of holdings in this fund's portfolio found on the oil / gas industry screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 25 | Fossil Free Funds | Oil / gas industry, weight | The percent of fund assets invested in holdings found on the oil / gas industry screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 26 | Fossil Free Funds | Oil / gas industry, asset | The amount in USD of fund assets invested in holdings found on the oil / gas industry screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 27 | Fossil Free Funds | Macroclimate 30 coal-fired utilities, count | The number of holdings in this fund's portfolio found on the Macroclimate 30 coal-fired utilities screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 28 | Fossil Free Funds | Macroclimate 30 coal-fired utilities, weight | The percent of fund assets invested in holdings found on the Macroclimate 30 coal-fired utilities screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 29 | Fossil Free Funds | Macroclimate 30 coal-fired utilities, asset | The amount in USD of fund assets invested in holdings found on the Macroclimate 30 coal-fired utilities screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 30 | Fossil Free Funds | Fossil-fired utilities, count | The number of holdings in this fund's portfolio found on the fossil-fired utilities screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 31 | Fossil Free Funds | Fossil-fired utilities, weight | The percent of fund assets invested in holdings found on the fossil-fired utilities screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 32 | Fossil Free Funds | Fossil-fired utilities, asset | The amount in USD of fund assets invested in holdings found on the fossil-fired utilities screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 33 | Fossil Free Funds | Relative carbon footprint (tonnes CO2 / $1M USD invested) | Expresses the greenhouse gas footprint of an investment sum. Relative carbon footprint is measured in metric tonnes of CO2 or CO2 equivalents per $1 million USD invested. A fund's carbon footprint accounts for direct and indirect (scope 1 and 2) emissions. Learn more at https://fossilfreefunds.org/how-it-works. |
| 34 | Fossil Free Funds | Relative carbon intensity (tonnes CO2 / $1M USD revenue) | Expresses the carbon efficiency of a portfolio. Relative carbon intensity is measured in metric tonnes of CO2 or CO2 equivalents per $1 million USD revenue. A fund's carbon intensity accounts for direct and indirect (scope 1 and 2) emissions. Learn more at https://fossilfreefunds.org/how-it-works. |
| 35 | Fossil Free Funds | Total financed emissions scope 1 + 2 (tCO2e) | Measures the absolute greenhouse gas footprint of a portfolio in tons of carbon dioxide equivalents (tCO2e). This measures the total annualized greenhouse gas emissions for which an equity portfolio is responsible, based on the 'ownership principle'. This is done by summing up the proportionate carbon emissions of companies in the portfolio based on the investor's ownership share. Learn more at https://fossilfreefunds.org/how-it-works. |
| 36 | Fossil Free Funds | Total financed emissions scope 1 + 2 + 3 (tCO2e) | The footprint analysis is based on direct and indirect company emissions (Scope 1 and Scope 2). Scope 3 emissions are only being reported in this specific subsection and on an industry level as currently the definition and the measurement and disclosure is not consistently applied by companies. Learn more at https://fossilfreefunds.org/how-it-works. |
| 37 | Fossil Free Funds | Carbon footprint portfolio coverage by market value weight | All footprint data is provided by yourSRI.com based on ISS-Ethix' database for greenhouse gas emissions of about 40,000 companies. Emissions data is based on disclosed sources, including documents such as company CSR reports, company websites, and non-governmental and regulatory databases, as well as approximations. In cases where the company does not disclose any carbon data or the reported data has been classified as not trustworthy, a carbon estimation methodology is applied. Coverage is measured as a percentage of market value weight. Learn more at https://fossilfreefunds.org/how-it-works. |
| 38 | Fossil Free Funds | Carbon footprint portfolio coverage by number of disclosing titles | All footprint data is provided by yourSRI.com based on ISS-Ethix' database for greenhouse gas emissions of about 40,000 companies. Emissions data is based on disclosed sources, including documents such as company CSR reports, company websites, and non-governmental and regulatory databases, as well as approximations. In cases where the company does not disclose any carbon data or the reported data has been classified as not trustworthy, a carbon estimation methodology is applied. Coverage is measured as a percentage of disclosing titles. Learn more at https://fossilfreefunds.org/how-it-works. |
| 39 | Fossil Free Funds | Clean200, count | The number of holdings in this fund's portfolio found on the Clean200 clean energy screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 40 | Fossil Free Funds | Clean200, weight | The percent of fund assets invested in holdings found on the Clean200 clean energy screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 41 | Fossil Free Funds | Clean200, asset | The amount in USD of fund assets invested in holdings found on the Clean200 clean energy screen list. Learn more at https://fossilfreefunds.org/how-it-works. |
| 42 | Deforestation Free Funds | Deforestation grade | The deforestation grade for this fund, based on exposure to three deforestation-risk screen lists. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 43 | Deforestation Free Funds | Deforestation-risk producer, count | The number of holdings in this fund's portfolio found on the deforestation-risk producer / trader screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 44 | Deforestation Free Funds | Deforestation-risk producer, weight | The percent of fund assets invested in holdings found on the deforestation-risk producer / trader screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 45 | Deforestation Free Funds | Deforestation-risk producer, asset | The amount in USD of fund assets invested in holdings found on the deforestation-risk producer / trader screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 46 | Deforestation Free Funds | Deforestation-risk financier, count | The number of holdings in this fund's portfolio found on the deforestation-risk banks and lenders screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 47 | Deforestation Free Funds | Deforestation-risk financier, weight | The percent of fund assets invested in holdings found on the deforestation-risk banks and lenders screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 48 | Deforestation Free Funds | Deforestation-risk financier, asset | The amount in USD of fund assets invested in holdings found on the deforestation-risk banks and lenders screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 49 | Deforestation Free Funds | Deforestation-risk consumer brand, count | The number of holdings in this fund's portfolio found on the deforestation-risk major consumer brands screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 50 | Deforestation Free Funds | Deforestation-risk consumer brand, weight | The percent of fund assets invested in holdings found on the deforestation-risk major consumer brands screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 51 | Deforestation Free Funds | Deforestation-risk consumer brand, asset | The amount in USD of fund assets invested in holdings found on the deforestation-risk major consumer brands screen list. Learn more at https://deforestationfreefunds.org/how-it-works. |
| 52 | Gender Equality Funds | Gender equality grade | The gender equality grade for this fund, based on the Equileap gender equality scores of the companies in the portfolio ranked against peer funds. Learn more at https://genderequalityfunds.org/how-it-works. |
| 53 | Gender Equality Funds | Gender equality group ranking | Each fund's gender equality score is ranked against other funds in the same category group. This ranking is expressed as a percentile where the 100th percentile is the best score in the group, and is the basis of the gender equality grade. Learn more at https://genderequalityfunds.org/how-it-works. |
| 54 | Gender Equality Funds | Gender equality score (out of 100 points) | The gender equality score is calculated by averaging the Equileap gender equality company scores of the portfolio holdings, weighted by market value, and rescaling 0-100. Learn more at https://genderequalityfunds.org/how-it-works. |
| 55 | Gender Equality Funds | Gender equality score, gender balance (out of 100 points) | The gender equality score is calculated by averaging the Equileap gender balance company scores of the portfolio holdings, weighted by market value, and rescaling 0-100. Learn more at https://genderequalityfunds.org/how-it-works. |
| 56 | Gender Equality Funds | Gender equality score, gender policies (out of 100 points) | The gender equality score is calculated by averaging the Equileap gender policies company scores of the portfolio holdings, weighted by market value, and rescaling 0-100. Learn more at https://genderequalityfunds.org/how-it-works. |
| 57 | Gender Equality Funds | Count of holdings with Equileap gender equality scores | The number of holdings in the portfolio where Equileap gender equality company scores are available. Learn more at https://genderequalityfunds.org/how-it-works. |
| 58 | Gender Equality Funds | Weight of holdings with Equileap gender equality scores | The percent of fund assets where Equileap gender equality company scores are available. Learn more at https://genderequalityfunds.org/how-it-works. |
| 59 | Gun Free Funds | Civilian firearm grade | The civilian firerarms grade for this fund, based on exposure to two civilian firerarm screen lists. Learn more at https://gunfreefunds.org/how-it-works. |
| 60 | Gun Free Funds | Civilian firearm, count | The number of holdings in this fund's portfolio found on the two civilian firearms screen lists. Learn more at https://gunfreefunds.org/how-it-works. |
| 61 | Gun Free Funds | Civilian firearm, weight | The percent of fund assets invested in holdings found on the two civilian firearms screen lists. Learn more at https://gunfreefunds.org/how-it-works. |
| 62 | Gun Free Funds | Civilian firearm, asset | The amount in USD of fund assets invested in holdings found on the two civilian firearms screen lists. Learn more at https://gunfreefunds.org/how-it-works. |
| 63 | Gun Free Funds | Gun manufacturer, count | The number of holdings in this fund's portfolio found on the civilian firearms manufacturer screen list. Learn more at https://gunfreefunds.org/how-it-works. |
| 64 | Gun Free Funds | Gun manufacturer, weight | The percent of fund assets invested in holdings found on the civilian firearms manufacturer screen list. Learn more at https://gunfreefunds.org/how-it-works. |
| 65 | Gun Free Funds | Gun manufacturer, asset | The amount in USD of fund assets invested in holdings found on the civilian firearms manufacturer screen list. Learn more at https://gunfreefunds.org/how-it-works. |
| 66 | Gun Free Funds | Gun retailer, count | The number of holdings in this fund's portfolio found on the civilian firearms retailer screen list. Learn more at https://gunfreefunds.org/how-it-works. |
| 67 | Gun Free Funds | Gun retailer, weight | The percent of fund assets invested in holdings found on the civilian firearms retailer screen list. Learn more at https://gunfreefunds.org/how-it-works. |
| 68 | Gun Free Funds | Gun retailer, asset | The amount in USD of fund assets invested in holdings found on the civilian firearms retailer screen list. Learn more at https://gunfreefunds.org/how-it-works. |
| 69 | Weapon Free Funds | Military weapon grade | The military weapons grade for this fund, based on exposure to three military weapon screen lists. Learn more at https://weaponfreefunds.org/how-it-works. |
| 70 | Weapon Free Funds | Military weapon, count | The number of holdings in this fund's portfolio found on the three military weapons screen lists. Learn more at https://weaponfreefunds.org/how-it-works. |
| 71 | Weapon Free Funds | Military weapon, weight | The percent of fund assets invested in holdings found on the three military weapons screen lists. Learn more at https://weaponfreefunds.org/how-it-works. |
| 72 | Weapon Free Funds | Military weapon, asset | The amount in USD of fund assets invested in holdings found on the three military weapons screen lists. Learn more at https://weaponfreefunds.org/how-it-works. |
| 73 | Weapon Free Funds | Major military contractors, count | The number of holdings in this fund's portfolio found on the major military contractors screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 74 | Weapon Free Funds | Major military contractors, weight | The percent of fund assets invested in holdings found on the major military contractors screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 75 | Weapon Free Funds | Major military contractors, asset | The amount in USD of fund assets invested in holdings found on the major military contractors screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 76 | Weapon Free Funds | Nuclear weapons, count | The number of holdings in this fund's portfolio found on the nuclear weapons manufacturing and servicing screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 77 | Weapon Free Funds | Nuclear weapons, weight | The percent of fund assets invested in holdings found on the nuclear weapons manufacturing and servicing screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 78 | Weapon Free Funds | Nuclear weapons, asset | The amount in USD of fund assets invested in holdings found on the nuclear weapons manufacturing and servicing screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 79 | Weapon Free Funds | Cluster munitions / landmines, count | The number of holdings in this fund's portfolio found on the cluster munitions / landmines manufacturer screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 80 | Weapon Free Funds | Cluster munitions / landmines, weight | The percent of fund assets invested in holdings found on the cluster munitions / landmines manufacturer screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 81 | Weapon Free Funds | Cluster munitions / landmines, asset | The amount in USD of fund assets invested in holdings found on the cluster munitions / landmines manufacturer screen list. Learn more at https://weaponfreefunds.org/how-it-works. |
| 82 | Tobacco Free Funds | Tobacco grade | The tobacco grade for this fund, based on exposure to two tobacco screen lists. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 83 | Tobacco Free Funds | Tobacco producer, count | The number of holdings in this fund's portfolio found on the tobacco producer screen list. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 84 | Tobacco Free Funds | Tobacco producer, weight | The percent of fund assets invested in holdings found on the tobacco producer screen list. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 85 | Tobacco Free Funds | Tobacco producer, asset | The amount in USD of fund assets invested in holdings found on the tobacco producer screen list. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 86 | Tobacco Free Funds | Tobacco-promoting entertainment company, count | The number of holdings in this fund's portfolio found on the tobacco-promoting entertainment company screen list. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 87 | Tobacco Free Funds | Tobacco-promoting entertainment company, weight | The percent of fund assets invested in holdings found on the tobacco-promoting entertainment company screen list. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 88 | Tobacco Free Funds | Tobacco-promoting entertainment company, asset | The amount in USD of fund assets invested in holdings found on the tobacco-promoting entertainment company screen list. Learn more at https://tobaccofreefunds.org/how-it-works. |
| 89 | Financial performance | Financial performance as-of date | The as-of date for the financial performance month end trailing returns. |
| 90 | Financial performance | Month end trailing returns, year 1 | One year annualized returns. Expressed in percentage terms, Morningstar's calculation of total return is determined each month by taking the change in monthly net asset value, reinvesting all income and capital-gains distributions during that month, and dividing by the starting NAV. Learn more at https://genderequalityfunds.org/how-it-works. |
| 91 | Financial performance | Month end trailing returns, year 3 | Three year annualized returns. Expressed in percentage terms, Morningstar's calculation of total return is determined each month by taking the change in monthly net asset value, reinvesting all income and capital-gains distributions during that month, and dividing by the starting NAV. Learn more at https://genderequalityfunds.org/how-it-works. |
| 92 | Financial performance | Month end trailing returns, year 5 | Five year annualized returns. Expressed in percentage terms, Morningstar's calculation of total return is determined each month by taking the change in monthly net asset value, reinvesting all income and capital-gains distributions during that month, and dividing by the starting NAV. Learn more at https://genderequalityfunds.org/how-it-works. |
| 93 | Financial performance | Month end trailing returns, year 10 | Ten year annualized returns. Expressed in percentage terms, Morningstar's calculation of total return is determined each month by taking the change in monthly net asset value, reinvesting all income and capital-gains distributions during that month, and dividing by the starting NAV. Learn more at https://genderequalityfunds.org/how-it-works. |
#create variables for each group and display information separately
#Our target value has to be 1-y as it is the most complete => need to show fill factor
#display(HTML( .to_html()))
origin_categories=["Fund profile","Fossil Free Funds", "Deforestation Free Funds", "Gender Equality Funds", "Gun Free Funds", "Prison Free Funds", "Weapon Free Funds", "Tobacco Free Funds", "Financial performance"]
for category in origin_categories:
print("Distribution of numerical features for category: "+category)
display(HTML(df.filter(regex=category+".*",axis=1).describe().to_html()))
print("\n\n")
Distribution of numerical features for category: Fund profile
| Fund profile: Fund net assets | Fund profile: Percent rated | |
|---|---|---|
| count | 1.105100e+05 | 110510.000000 |
| mean | 7.421210e+09 | 0.943398 |
| std | 3.493070e+10 | 0.105523 |
| min | 1.534680e+05 | 0.400349 |
| 25% | 2.025332e+08 | 0.951903 |
| 50% | 8.267780e+08 | 0.977816 |
| 75% | 3.094538e+09 | 0.991256 |
| max | 1.075580e+12 | 1.000000 |
Distribution of numerical features for category: Fossil Free Funds
| Fossil Free Funds: Fossil fuel holdings, count | Fossil Free Funds: Fossil fuel holdings, weight | Fossil Free Funds: Fossil fuel holdings, asset | Fossil Free Funds: Carbon Underground 200, count | Fossil Free Funds: Carbon Underground 200, weight | Fossil Free Funds: Carbon Underground 200, asset | Fossil Free Funds: Coal industry, count | Fossil Free Funds: Coal industry, weight | Fossil Free Funds: Coal industry, asset | Fossil Free Funds: Oil / gas industry, count | Fossil Free Funds: Oil / gas industry, weight | Fossil Free Funds: Oil / gas industry, asset | Fossil Free Funds: Macroclimate 30 coal-fired utilities, count | Fossil Free Funds: Macroclimate 30 coal-fired utilities, weight | Fossil Free Funds: Macroclimate 30 coal-fired utilities, asset | Fossil Free Funds: Fossil-fired utilities, count | Fossil Free Funds: Fossil-fired utilities, weight | Fossil Free Funds: Fossil-fired utilities, asset | Fossil Free Funds: Relative carbon footprint (tonnes CO2 / $1M USD invested) | Fossil Free Funds: Relative carbon intensity (tonnes CO2 / $1M USD revenue) | Fossil Free Funds: Total financed emissions scope 1 + 2 (tCO2e) | Fossil Free Funds: Total financed emissions scope 1 + 2 + 3 (tCO2e) | Fossil Free Funds: Carbon footprint portfolio coverage by market value weight | Fossil Free Funds: Carbon footprint portfolio coverage by number of disclosing titles | Fossil Free Funds: Clean200, count | Fossil Free Funds: Clean200, weight | Fossil Free Funds: Clean200, asset | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 1.105100e+05 | 110510.000000 | 110510.000000 | 110510.000000 | 110510.000000 | 1.105100e+05 |
| mean | 16.776328 | 0.066618 | 4.559884e+08 | 5.080291 | 0.022519 | 1.625754e+08 | 2.051154 | 0.005956 | 3.603254e+07 | 8.966329 | 0.035334 | 2.135207e+08 | 1.287892 | 0.007629 | 8.170273e+07 | 7.065207 | 0.030147 | 2.397661e+08 | 120.149909 | 167.592131 | 8.104975e+05 | 2.531491e+06 | 0.902381 | 0.538557 | 9.926513 | 0.074519 | 6.763798e+08 |
| std | 36.225283 | 0.120382 | 2.416856e+09 | 10.294005 | 0.055667 | 8.644581e+08 | 7.080570 | 0.014675 | 2.952930e+08 | 19.619299 | 0.097442 | 1.100159e+09 | 2.575200 | 0.018861 | 6.400949e+08 | 16.051047 | 0.063305 | 1.387114e+09 | 139.569661 | 194.430358 | 4.049854e+06 | 1.285494e+07 | 0.114800 | 0.260548 | 16.027081 | 0.065907 | 3.597203e+09 |
| min | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000e+00 |
| 25% | 1.000000 | 0.004361 | 4.081950e+05 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 27.830000 | 64.202500 | 1.241923e+04 | 4.403967e+04 | 0.890223 | 0.360000 | 2.000000 | 0.017976 | 2.929204e+06 |
| 50% | 6.000000 | 0.042483 | 1.946916e+07 | 2.000000 | 0.009438 | 2.591610e+06 | 0.000000 | 0.000000 | 0.000000e+00 | 3.000000 | 0.017249 | 7.172282e+06 | 0.000000 | 0.000000 | 0.000000e+00 | 2.000000 | 0.018291 | 5.568960e+06 | 81.785000 | 126.530000 | 6.703449e+04 | 2.268255e+05 | 0.939559 | 0.574074 | 5.000000 | 0.067256 | 3.527957e+07 |
| 75% | 17.000000 | 0.081263 | 1.132204e+08 | 5.000000 | 0.027531 | 3.265208e+07 | 1.000000 | 0.005303 | 3.014772e+06 | 8.000000 | 0.038630 | 5.082529e+07 | 1.000000 | 0.008828 | 6.446923e+06 | 7.000000 | 0.040002 | 4.873230e+07 | 160.680000 | 206.030000 | 2.557974e+05 | 8.391097e+05 | 0.967733 | 0.756972 | 11.000000 | 0.109732 | 2.058332e+08 |
| max | 607.000000 | 1.000000 | 6.561243e+10 | 154.000000 | 0.987275 | 2.145536e+10 | 126.000000 | 0.430865 | 9.675759e+09 | 304.000000 | 1.000000 | 2.751784e+10 | 31.000000 | 0.318989 | 2.000770e+10 | 286.000000 | 0.970667 | 3.884303e+10 | 1911.540000 | 3279.730000 | 8.837339e+07 | 3.252584e+08 | 0.999999 | 1.000000 | 210.000000 | 0.563840 | 1.246118e+11 |
Distribution of numerical features for category: Deforestation Free Funds
| Deforestation Free Funds: Deforestation-risk producer, count | Deforestation Free Funds: Deforestation-risk producer, weight | Deforestation Free Funds: Deforestation-risk producer, asset | Deforestation Free Funds: Deforestation-risk financier, count | Deforestation Free Funds: Deforestation-risk financier, weight | Deforestation Free Funds: Deforestation-risk financier, asset | Deforestation Free Funds: Deforestation-risk consumer brand, count | Deforestation Free Funds: Deforestation-risk consumer brand, weight | Deforestation Free Funds: Deforestation-risk consumer brand, asset | |
|---|---|---|---|---|---|---|---|---|---|
| count | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 |
| mean | 1.721220 | 0.004834 | 2.564535e+07 | 2.012243 | 0.015636 | 1.282902e+08 | 9.727002 | 0.071461 | 6.741212e+08 |
| std | 5.511702 | 0.012479 | 1.759466e+08 | 4.113846 | 0.026991 | 7.845226e+08 | 14.396919 | 0.070912 | 4.192372e+09 |
| min | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 25% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 1.000000 | 0.012772 | 2.040628e+06 |
| 50% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 5.000000 | 0.057369 | 3.039811e+07 |
| 75% | 1.000000 | 0.005083 | 2.831012e+06 | 3.000000 | 0.023091 | 2.211200e+07 | 11.000000 | 0.117454 | 1.926315e+08 |
| max | 97.000000 | 0.419285 | 5.494813e+09 | 44.000000 | 0.458033 | 2.398488e+10 | 170.000000 | 0.769213 | 1.361574e+11 |
Distribution of numerical features for category: Gender Equality Funds
| Gender Equality Funds: Gender equality group ranking | Gender Equality Funds: Gender equality score (out of 100 points) | Gender Equality Funds: Gender equality score, gender balance (out of 100 points) | Gender Equality Funds: Gender equality score, gender policies (out of 100 points) | Gender Equality Funds: Count of holdings with Equileap gender equality scores | Gender Equality Funds: Weight of holdings with Equileap gender equality scores | Gender Equality Funds: Gender equality score - Overall score (out of 100 points) | Gender Equality Funds: Gender equality score - Gender balance in leadership and workforce (out of 40 points) | Gender Equality Funds: Gender equality score - Equal compensation and work life balance (out of 30 points) | Gender Equality Funds: Gender equality score - Policies promoting gender equality (out of 20 points) | Gender Equality Funds: Gender equality score - Commitment, transparency, and accountability (out of 10 points) | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 107248.000000 | 55648.000000 | 55648.000000 | 55648.000000 | 110510.000000 | 110510.000000 | 54602.000000 | 54602.000000 | 54602.000000 | 54602.000000 | 54602.000000 |
| mean | 51.667925 | 47.846967 | 38.615098 | 65.649026 | 148.063171 | 0.865151 | 37.575016 | 17.966705 | 4.694791 | 14.602872 | 0.205304 |
| std | 28.294964 | 11.134500 | 11.948504 | 15.257334 | 230.042228 | 0.193753 | 8.238707 | 4.164146 | 2.462446 | 2.299153 | 0.408077 |
| min | -1.000000 | -5.000000 | -1.000000 | -1.000000 | -1.000000 | 0.000000 | 8.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 |
| 25% | 28.000000 | 39.000000 | 29.000000 | 58.000000 | 45.000000 | 0.846149 | 31.000000 | 15.000000 | 2.000000 | 13.000000 | 0.000000 |
| 50% | 53.000000 | 52.000000 | 42.000000 | 71.000000 | 70.000000 | 0.954844 | 40.000000 | 19.000000 | 5.000000 | 15.000000 | 0.000000 |
| 75% | 76.000000 | 57.000000 | 48.000000 | 76.000000 | 149.000000 | 0.982787 | 44.000000 | 21.000000 | 6.000000 | 16.000000 | 0.000000 |
| max | 100.000000 | 71.000000 | 67.000000 | 90.000000 | 3549.000000 | 1.000000 | 57.000000 | 29.000000 | 14.000000 | 19.000000 | 2.000000 |
Distribution of numerical features for category: Gun Free Funds
| Gun Free Funds: Civilian firearm, count | Gun Free Funds: Civilian firearm, weight | Gun Free Funds: Civilian firearm, asset | Gun Free Funds: Gun manufacturer, count | Gun Free Funds: Gun manufacturer, weight | Gun Free Funds: Gun manufacturer, asset | Gun Free Funds: Gun retailer, count | Gun Free Funds: Gun retailer, weight | Gun Free Funds: Gun retailer, asset | |
|---|---|---|---|---|---|---|---|---|---|
| count | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 |
| mean | 0.367134 | 0.002291 | 1.476360e+07 | 0.133997 | 0.000233 | 5.793564e+05 | 0.233137 | 0.002059 | 1.418425e+07 |
| std | 0.976743 | 0.006541 | 1.760328e+08 | 0.622026 | 0.001626 | 6.528876e+06 | 0.520607 | 0.006356 | 1.726770e+08 |
| min | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 25% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 50% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 75% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| max | 9.000000 | 0.123578 | 6.422196e+09 | 5.000000 | 0.059507 | 2.388009e+08 | 4.000000 | 0.123578 | 6.234913e+09 |
Distribution of numerical features for category: Prison Free Funds
| Prison Free Funds: All flagged, count | Prison Free Funds: All flagged, weight | Prison Free Funds: All flagged, asset | Prison Free Funds: Prison industry, count | Prison Free Funds: Prison industry, weight | Prison Free Funds: Prison industry, asset | Prison Free Funds: Border industry, count | Prison Free Funds: Border industry, weight | Prison Free Funds: Border industry, asset | Prison Free Funds: All flagged, higher risk, count | Prison Free Funds: All flagged, higher risk, weight | Prison Free Funds: All flagged, higher risk, asset | Prison Free Funds: Prison industry, higher risk, count | Prison Free Funds: Prison industry, higher risk, weight | Prison Free Funds: Prison industry, higher risk, asset | Prison Free Funds: Border industry, higher risk, count | Prison Free Funds: Border industry, higher risk, weight | Prison Free Funds: Border industry, higher risk, asset | Prison Free Funds: Private prison operators, count | Prison Free Funds: Private prison operators, weight | Prison Free Funds: Private prison operators, asset | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 73327.000000 | 73327.000000 | 7.332700e+04 | 73327.000000 | 73327.000000 | 7.332700e+04 | 73327.000000 | 73327.000000 | 7.332700e+04 | 73327.000000 | 73327.000000 | 7.332700e+04 | 73327.00000 | 73327.000000 | 7.332700e+04 | 73327.000000 | 73327.000000 | 7.332700e+04 | 73327.000000 | 73327.000000 | 7.332700e+04 |
| mean | 4.025339 | 0.053004 | 7.014752e+08 | 1.860720 | 0.014355 | 1.502954e+08 | 3.279215 | 0.049007 | 6.582665e+08 | 1.282720 | 0.007317 | 9.458700e+07 | 0.30979 | 0.000973 | 5.739907e+06 | 1.108923 | 0.006691 | 8.982786e+07 | 0.158536 | 0.000445 | 1.456922e+06 |
| std | 5.600233 | 0.064048 | 4.721844e+09 | 2.889954 | 0.023717 | 1.062010e+09 | 4.510981 | 0.061891 | 4.407261e+09 | 2.039754 | 0.014349 | 5.406483e+08 | 0.80476 | 0.004256 | 4.374918e+07 | 1.838222 | 0.013961 | 5.344365e+08 | 0.570387 | 0.003249 | 1.548875e+07 |
| min | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.00000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 25% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.00000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 50% | 2.000000 | 0.017992 | 1.094116e+07 | 1.000000 | 0.003490 | 6.321090e+05 | 2.000000 | 0.014145 | 6.961842e+06 | 0.000000 | 0.000000 | 0.000000e+00 | 0.00000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 75% | 6.000000 | 0.094693 | 1.396684e+08 | 3.000000 | 0.019737 | 2.824184e+07 | 5.000000 | 0.088201 | 1.147099e+08 | 2.000000 | 0.010257 | 1.240795e+07 | 0.00000 | 0.000000 | 0.000000e+00 | 2.000000 | 0.009384 | 9.794897e+06 | 0.000000 | 0.000000 | 0.000000e+00 |
| max | 46.000000 | 0.581728 | 1.484406e+11 | 35.000000 | 0.363807 | 3.999880e+10 | 36.000000 | 0.581728 | 1.335580e+11 | 20.000000 | 0.488611 | 1.429152e+10 | 10.00000 | 0.111841 | 1.066400e+09 | 15.000000 | 0.488611 | 1.411504e+10 | 7.000000 | 0.099286 | 4.031889e+08 |
Distribution of numerical features for category: Weapon Free Funds
| Weapon Free Funds: Military weapon, count | Weapon Free Funds: Military weapon, weight | Weapon Free Funds: Military weapon, asset | Weapon Free Funds: Major military contractors, count | Weapon Free Funds: Major military contractors, weight | Weapon Free Funds: Major military contractors, asset | Weapon Free Funds: Nuclear weapons, count | Weapon Free Funds: Nuclear weapons, weight | Weapon Free Funds: Nuclear weapons, asset | Weapon Free Funds: Cluster munitions / landmines, count | Weapon Free Funds: Cluster munitions / landmines, weight | Weapon Free Funds: Cluster munitions / landmines, asset | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 |
| mean | 3.294833 | 0.016616 | 1.823725e+08 | 3.253163 | 0.016549 | 1.821343e+08 | 1.602000 | 0.009491 | 1.296912e+08 | 0.037743 | 0.000015 | 6.391814e+04 |
| std | 5.221361 | 0.025743 | 9.427030e+08 | 5.147298 | 0.025762 | 9.424386e+08 | 2.556526 | 0.018837 | 7.131973e+08 | 0.365929 | 0.000218 | 1.270657e+06 |
| min | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 25% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 50% | 1.000000 | 0.011855 | 5.140992e+06 | 1.000000 | 0.011795 | 4.903307e+06 | 1.000000 | 0.000927 | 7.446500e+04 | 0.000000 | 0.000000 | 0.000000e+00 |
| 75% | 4.000000 | 0.025795 | 4.442682e+07 | 4.000000 | 0.025757 | 4.355494e+07 | 2.000000 | 0.015139 | 1.719410e+07 | 0.000000 | 0.000000 | 0.000000e+00 |
| max | 66.000000 | 0.860331 | 2.723234e+10 | 63.000000 | 0.860331 | 2.723234e+10 | 23.000000 | 0.687890 | 1.928129e+10 | 7.000000 | 0.009169 | 5.162492e+07 |
Distribution of numerical features for category: Tobacco Free Funds
| Tobacco Free Funds: Tobacco producer, count | Tobacco Free Funds: Tobacco producer, weight | Tobacco Free Funds: Tobacco producer, asset | Tobacco Free Funds: Tobacco-promoting entertainment company, count | Tobacco Free Funds: Tobacco-promoting entertainment company, weight | Tobacco Free Funds: Tobacco-promoting entertainment company, asset | |
|---|---|---|---|---|---|---|
| count | 110510.000000 | 110510.000000 | 1.105100e+05 | 110510.000000 | 110510.000000 | 1.105100e+05 |
| mean | 0.792019 | 0.005017 | 7.821135e+07 | 0.710325 | 0.007367 | 8.063425e+07 |
| std | 1.497490 | 0.011223 | 4.810194e+08 | 1.207540 | 0.014824 | 6.045201e+08 |
| min | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 25% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 50% | 0.000000 | 0.000000 | 0.000000e+00 | 0.000000 | 0.000000 | 0.000000e+00 |
| 75% | 1.000000 | 0.005041 | 2.672713e+06 | 1.000000 | 0.010001 | 6.559704e+06 |
| max | 19.000000 | 0.140505 | 5.913728e+09 | 8.000000 | 0.224224 | 2.237722e+10 |
Distribution of numerical features for category: Financial performance
| Financial performance: Month end trailing returns, year 1 | Financial performance: Month end trailing returns, year 3 | Financial performance: Month end trailing returns, year 5 | Financial performance: Month end trailing returns, year 10 | |
|---|---|---|---|---|
| count | 108367.000000 | 103448.000000 | 96542.000000 | 81748.000000 |
| mean | 8.354840 | 6.455049 | 8.315809 | 9.381584 |
| std | 20.709696 | 8.775643 | 7.034999 | 4.877457 |
| min | -79.657770 | -50.617880 | -39.775530 | -25.167160 |
| 25% | -5.553780 | 0.870672 | 3.775177 | 6.437010 |
| 50% | 5.761320 | 5.415205 | 7.775750 | 9.396265 |
| 75% | 19.653715 | 11.350495 | 12.442040 | 12.601810 |
| max | 237.930500 | 71.112440 | 54.301480 | 24.884430 |
columns_stats=pd.DataFrame()
columns_stats['fill_percent']=df.notnull().sum(axis=0)/len(df)*100
fig = plt.figure(figsize=(10, 22))
columns_stats['fill_percent'].sort_values().plot.barh()
plt.title("Fill-factor for all features")
plt.xlabel("Percentage")
plt.gca().xaxis.set_major_formatter(mtick.PercentFormatter())
plt.show()
columns_stats[columns_stats['fill_percent']<60]
| fill_percent | |
|---|---|
| Fund profile: Sustainability mandate | 20.634332 |
| Fund profile: US-SIF member | 1.544657 |
| Gender Equality Funds: Gender equality score (out of 100 points) | 50.355624 |
| Gender Equality Funds: Gender equality score, gender balance (out of 100 points) | 50.355624 |
| Gender Equality Funds: Gender equality score, gender policies (out of 100 points) | 50.355624 |
| Gender Equality Funds: Gender equality score - Overall score (out of 100 points) | 49.409103 |
| Gender Equality Funds: Gender equality score - Gender balance in leadership and workforce (out of 40 points) | 49.409103 |
| Gender Equality Funds: Gender equality score - Equal compensation and work life balance (out of 30 points) | 49.409103 |
| Gender Equality Funds: Gender equality score - Policies promoting gender equality (out of 20 points) | 49.409103 |
| Gender Equality Funds: Gender equality score - Commitment, transparency, and accountability (out of 10 points) | 49.409103 |
df.drop(columns=columns_stats[columns_stats['fill_percent']<60].index.values.tolist(), axis=1, inplace=True)
columns_stats['fill_percent'].filter(regex="Financial performance.*")
Financial performance: Financial performance as-of date 99.994571 Financial performance: Month end trailing returns, year 1 98.060809 Financial performance: Month end trailing returns, year 3 93.609628 Financial performance: Month end trailing returns, year 5 87.360420 Financial performance: Month end trailing returns, year 10 73.973396 Name: fill_percent, dtype: float64
The "Financial performance: Month end trailing returns, year 1" is the most complete variable as a high percentage of funds have an inception date greater than 2 years (so performance for "year 1" is available) but less than 10 years (so no performance data available for "year 10")
perf_date=pd.DataFrame()
for year in [1,3,5,10]:
filter_df=df['Fund profile: Shareclass inception date'][( (df['Financial performance: Financial performance as-of date'] - pd.DateOffset(years=year)) > df['Fund profile: Shareclass inception date'] )]
perf_date["year"+str(year)] =filter_df.groupby(filter_df.dt.year).count()
#Normalize row perf_data by year
perf_date_norm=perf_date.div(perf_date.sum(axis=1), axis=0)*100
perf_date_norm.loc['2000-1-1 00:00:00':'2022-1-1 00:00:00'].plot.bar(figsize=(16, 8), stacked=True)
#Plot properties
plt.xlabel("Inception fund dates")
plt.ylabel("Percentage")
plt.title("Fund inception date inception date crossed with (performance as-of date - year)")
plt.legend(loc='lower center', bbox_to_anchor=(0.5, -0.22),
ncol=4, fancybox=True, shadow=True)
plt.gca().yaxis.set_major_formatter(mtick.PercentFormatter())
#plt.setp(plt.gca().get_xticklabels(), rotation=30, horizontalalignment='right')
plt.show()
columns_stats=pd.DataFrame()
columns_stats['unique_values']=df.nunique()/len(df)*100
fig = plt.figure(figsize=(10, 22))
columns_stats['unique_values'].sort_values().plot.barh()
plt.title("Data uniqueness for all features")
plt.xlabel("Percentage")
plt.gca().xaxis.set_major_formatter(mtick.PercentFormatter())
plt.show()
#cols_df=pd.read_excel('/kaggle/input/fossil-free-funds/misc/replace.xlsx', 'Cols', engine='openpyxl')
cols_df=pd.read_excel('~/Downloads/replace.xlsx', 'Cols', engine='openpyxl')
df.rename(columns=dict(zip(cols_df["Column original"],cols_df["Short column name"])), inplace=True)
def getColCategory(category):
return list(set(cols_df[cols_df['Category']==category]['Short column name']) & set(df.columns))
def getColType(type_col):
return list(set(cols_df[cols_df['Type']==type_col]['Short column name']) & set(df.columns))
def getEncoding(shortName):
return cols_df[cols_df['Short column name']==shortName]['encoding'].values[0]
continuous= getColType('Continuous')
discrete= getColType('Discrete')
ordinal= getColType('Ordinal')
nominal= getColType('Nominal')
date_cols=df.filter(regex=".*Date.*",axis=1).columns
threshold_0_level=10
def zeros_columns(df, col_category):
zeros_percentage=(df[col_category]==0).sum()*100/len(df[col_category])
zeros=zeros_percentage[(zeros_percentage>threshold_0_level)].index.values.tolist()
print("Columns with 0-values > "+str(threshold_0_level)+"% : "+str(len(zeros))+"/"+str(len(col_category)))
print(zeros_percentage[(zeros_percentage>threshold_0_level)].sort_values(ascending=False))
return zeros
continuous_zeros = zeros_columns(df, continuous)
discrete_zeros = zeros_columns(df, discrete)
Columns with 0-values > 10% : 52/65 W_ClusterMunitions_a 98.328658 W_ClusterMunitions_w 98.328658 G_GunManufacturer_a 93.501041 G_GunManufacturer_w 93.501041 G_GunRetailer_w 80.152022 G_GunRetailer_a 80.152022 G_CivilianFirearm_w 77.507013 G_CivilianFirearm_a 77.507013 T_TobaccoProducer_a 64.841191 T_TobaccoProducer_w 64.841191 D_RiskProducer_w 62.764456 D_RiskProducer_a 62.764456 F_CoalIndustry_w 62.061352 F_CoalIndustry_a 62.061352 T_Tobacco-Promoting_a 61.771785 T_Tobacco-Promoting_w 61.771785 F_30Coal-FiredUtilities_w 61.066872 F_30Coal-FiredUtilities_a 61.066872 P_PrivatePrisonOperators_a 60.136639 P_PrivatePrisonOperators_w 60.136639 P_PrisonIndustryHR_w 53.933581 P_PrisonIndustryHR_a 53.933581 D_RiskFinancier_a 53.377975 D_RiskFinancier_w 53.377975 W_NuclearWeapons_a 48.504208 W_NuclearWeapons_w 48.504208 F_CarbonUnderground_a 37.993847 F_CarbonUnderground_w 37.993847 P_BorderIndustryHR_a 37.031038 P_BorderIndustryHR_w 37.031038 P_AllFlaggedHR_a 34.322686 P_AllFlaggedHR_w 34.322686 F_Fossil-FiredUtilities_w 32.958103 F_Fossil-FiredUtilities_a 32.958103 W_MilitaryContractors_w 31.869514 W_MilitaryContractors_a 31.869514 W_MilitaryWeapon_a 31.246946 W_MilitaryWeapon_w 31.246946 P_PrisonIndustry_a 29.593702 P_PrisonIndustry_w 29.593702 F_Oil/GasIndustry_w 29.027237 F_Oil/GasIndustry_a 29.027237 F_FossilFuelHoldings_w 22.225138 F_FossilFuelHoldings_a 22.225138 P_BorderIndustry_w 21.988960 P_BorderIndustry_a 21.988960 P_AllFlagged_a 19.483305 P_AllFlagged_w 19.483305 D_RiskConsumerBrand_w 15.825717 D_RiskConsumerBrand_a 15.825717 F_Clean200_w 13.002443 F_Clean200_a 13.002443 dtype: float64 Columns with 0-values > 10% : 26/32 W_ClusterMunitions_c 98.328658 G_GunManufacturer_c 93.501041 G_GunRetailer_c 80.152022 G_CivilianFirearm_c 77.507013 T_TobaccoProducer_c 64.841191 D_RiskProducer_c 62.764456 F_CoalIndustry_c 62.061352 T_Tobacco-Promoting_c 61.771785 F_30Coal-FiredUtilities_c 61.066872 P_PrivatePrisonOperators_c 60.136639 P_PrisonIndustryHR_c 53.933581 D_RiskFinancier_c 53.377975 W_NuclearWeapons_c 48.504208 F_CarbonUnderground_c 37.993847 P_BorderIndustryHR_c 37.031038 P_AllFlaggedHR_c 34.322686 F_Fossil-FiredUtilities_c 32.958103 W_MilitaryContractors_c 31.869514 W_MilitaryWeapon_c 31.246946 P_PrisonIndustry_c 29.593702 F_Oil/GasIndustry_c 29.027237 F_FossilFuelHoldings_c 22.225138 P_BorderIndustry_c 21.988960 P_AllFlagged_c 19.483305 D_RiskConsumerBrand_c 15.825717 F_Clean200_c 13.002443 dtype: float64
threshold_null_level=2
def null_columns(df, col_category):
null_percentage=(df[col_category].isnull()).sum()*100/len(df[col_category])
nulls=null_percentage[(null_percentage>threshold_null_level)].index.values.tolist()
print("Columns with null-values > "+str(threshold_null_level)+"% : "+str(len(nulls))+"/"+str(len(col_category)))
print(null_percentage[(null_percentage>threshold_null_level)].sort_values(ascending=False))
return nulls
discrete_null = null_columns(df, discrete)
continuous_null = null_columns(df, continuous)
nominal_null = null_columns(df, nominal)
ordinal_null = null_columns(df, ordinal)
Columns with null-values > 2% : 8/32 P_BorderIndustryHR_c 33.646729 P_PrisonIndustryHR_c 33.646729 P_BorderIndustry_c 33.646729 P_PrisonIndustry_c 33.646729 P_PrivatePrisonOperators_c 33.646729 P_AllFlaggedHR_c 33.646729 P_AllFlagged_c 33.646729 GE_GenderEqualityRanking 2.951769 dtype: float64 Columns with null-values > 2% : 17/65 P_BorderIndustryHR_w 33.646729 P_AllFlagged_w 33.646729 P_AllFlaggedHR_w 33.646729 P_PrivatePrisonOperators_a 33.646729 P_PrivatePrisonOperators_w 33.646729 P_PrisonIndustry_w 33.646729 P_BorderIndustry_a 33.646729 P_PrisonIndustryHR_a 33.646729 P_PrisonIndustryHR_w 33.646729 P_AllFlaggedHR_a 33.646729 P_PrisonIndustry_a 33.646729 P_BorderIndustry_w 33.646729 P_AllFlagged_a 33.646729 P_BorderIndustryHR_a 33.646729 FP_ReturnsY10 26.026604 FP_ReturnsY5 12.639580 FP_ReturnsY3 6.390372 dtype: float64 Columns with null-values > 2% : 1/7 FI_Ticker 2.193467 dtype: float64 Columns with null-values > 2% : 2/7 P_PrisonIndustrialComplexGrade 33.646729 GE_GenderEqualityGrade 3.854855 dtype: float64
df.duplicated().sum()
0
df[nominal].nunique()/len(df)*100
FI_ShareclassType 0.001810 FI_FundName 3.275722 FI_Ticker 9.096009 FI_CategoryGroup 0.004524 FI_ShareclassName 9.996380 FI_ShareclassTickers 3.147226 FI_AssetManager 0.191838 dtype: float64
index_col=['FI_ShareclassName', 'FP_PerformanceAs-OfDate']
duplicate_rows=df[df.duplicated(subset=index_col, keep=False)]
#duplicate_rows.to_csv('/kaggle/working/temp.csv', sep=';')
duplicate_rows.to_csv('~/Downloads/temp.csv', sep=';')
duplicate_rows
| FI_ShareclassName | FI_Ticker | FI_FundName | FI_AssetManager | FI_ShareclassType | FI_ShareclassInceptionDate | FI_CategoryGroup | FI_OldestShareInceptionDate | FI_ShareclassTickers | FI_PortfolioHoldingsAs-OfDate | ... | P_AllFlaggedHR_a | P_PrisonIndustryHR_c | P_PrisonIndustryHR_w | P_PrisonIndustryHR_a | P_BorderIndustryHR_c | P_BorderIndustryHR_w | P_BorderIndustryHR_a | P_PrivatePrisonOperators_c | P_PrivatePrisonOperators_w | P_PrivatePrisonOperators_a | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4774 | Invesco Oppenheimer Sml Cap Val R5 | OVSAX | Invesco Oppenheimer Small Cap Value Fund | Invesco | Open-end mutual fund | 2019-05-24 | U.S. Equity Fund | 2015-12-07 | IOSDX, OVSAX, OVSCX, OVSIX, OVSRX, OVSYX | 2019-12-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 11464 | Delaware Global Value A | DABAX | Delaware Global Value Fund | Delaware Funds by Macquarie | Open-end mutual fund | 1997-12-19 | International Equity Funds | 1997-12-19 | DABAX, DABCX, DABIX | 2020-03-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 11465 | Delaware Global Value C | DABAX | Delaware Global Value Fund | Delaware Funds by Macquarie | Open-end mutual fund | 2001-09-28 | International Equity Funds | 1997-12-19 | DABAX, DABCX, DABIX | 2020-03-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 11466 | Delaware Global Value Inst | DABAX | Delaware Global Value Fund | Delaware Funds by Macquarie | Open-end mutual fund | 1997-12-19 | International Equity Funds | 1997-12-19 | DABAX, DABCX, DABIX | 2020-03-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 13992 | Invesco Oppenheimer Sml Cap Val R5 | IOSDX | Invesco Oppenheimer Small Cap Value Fund | Invesco | Open-end mutual fund | 2019-05-24 | U.S. Equity Fund | 2019-05-24 | IOSDX | 2019-12-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 64868 | Xtrackers S&P 500 ESG ETF | SNPE | Xtrackers S&P 500 ESG ETF | Xtrackers | ETF | 2019-06-25 | U.S. Equity Fund | 2019-06-25 | SNPE | 2020-08-31 | ... | 2638225.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.009747 | 2638225.0 | 0.0 | 0.0 | 0.0 |
| 64869 | Zevenbergen Genea Institutional | ZVGIX | Zevenbergen Genea Fund | Zevenbergen Capital Investments | Open-end mutual fund | 2015-08-31 | U.S. Equity Fund | 2015-08-31 | ZVGIX, ZVGNX | 2020-06-30 | ... | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
| 64870 | Zevenbergen Genea Investor | ZVGNX | Zevenbergen Genea Fund | Zevenbergen Capital Investments | Open-end mutual fund | 2015-08-31 | U.S. Equity Fund | 2015-08-31 | ZVGIX, ZVGNX | 2020-06-30 | ... | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
| 64871 | Zevenbergen Growth Institutional | ZVNIX | Zevenbergen Growth Fund | Zevenbergen Capital Investments | Open-end mutual fund | 2015-08-31 | U.S. Equity Fund | 2015-08-31 | ZVNBX, ZVNIX | 2020-06-30 | ... | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
| 64872 | Zevenbergen Growth Investor | ZVNBX | Zevenbergen Growth Fund | Zevenbergen Capital Investments | Open-end mutual fund | 2015-08-31 | U.S. Equity Fund | 2015-08-31 | ZVNBX, ZVNIX | 2020-06-30 | ... | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 |
18500 rows × 111 columns
After looking at the raw data, it appears data has been published twice in 2 datasets:
origin_len=len(df)
duplicate_len=len(df[df.duplicated(subset=index_col, keep='last')])
df=df[~df.duplicated(subset=index_col, keep='last')]
print("Remaining rows:",len(df),"(",origin_len,"-",duplicate_len,")")
df[df.duplicated(subset=index_col, keep=False)]
Remaining rows: 101260 ( 110510 - 9250 )
| FI_ShareclassName | FI_Ticker | FI_FundName | FI_AssetManager | FI_ShareclassType | FI_ShareclassInceptionDate | FI_CategoryGroup | FI_OldestShareInceptionDate | FI_ShareclassTickers | FI_PortfolioHoldingsAs-OfDate | ... | P_AllFlaggedHR_a | P_PrisonIndustryHR_c | P_PrisonIndustryHR_w | P_PrisonIndustryHR_a | P_BorderIndustryHR_c | P_BorderIndustryHR_w | P_BorderIndustryHR_a | P_PrivatePrisonOperators_c | P_PrivatePrisonOperators_w | P_PrivatePrisonOperators_a |
|---|
0 rows × 111 columns
With the plot below, we want to verify if there is a data gap:
df_tmp=df.copy()
df_tmp['FI_AssetManagerFirstLetter']=df_tmp['FI_AssetManager'].str[0]
grouped_df=df_tmp.groupby(df_tmp['FP_PerformanceAs-OfDate'])
grouped_df['FI_AssetManagerFirstLetter'].value_counts()
FP_PerformanceAs-OfDate FI_AssetManagerFirstLetter
2020-03-31 F 1130
J 951
A 914
I 782
B 697
...
2021-02-28 L 13
U 7
K 6
X 5
1 3
Name: FI_AssetManagerFirstLetter, Length: 280, dtype: int64
grouped_df['FI_AssetManagerFirstLetter'].value_counts().groupby(level=0).apply(
lambda x: x
).unstack().plot.bar(figsize=(16, 8), stacked=True)
#Plot properties
plt.ylabel("Number of funds")
plt.xlabel("FI_AssetManagerFirstLetter")
plt.title("Number of Asset Manager by date")
plt.get_cmap('gist_rainbow')
plt.legend(loc='lower center', bbox_to_anchor=(0.5, -0.35),
ncol=10, fancybox=True, shadow=True)
plt.setp(plt.gca().get_xticklabels(), rotation=30, horizontalalignment='right')
plt.show()
per_share_max_count = df.groupby(['FI_ShareclassName'])['FI_ShareclassName'].value_counts().max()
threshold_max_count=0.6
partial_share_missing=df.copy()
partial_share_missing=partial_share_missing.groupby(['FI_ShareclassName']).filter(lambda x: len(x) <= threshold_max_count * per_share_max_count)
partial_share_missing.groupby(['FI_ShareclassName'])['FI_ShareclassName'].value_counts().sort_values(ascending=False)
FI_ShareclassName FI_ShareclassName
Morgan Stanley EmMkts Breakout Ntns C Morgan Stanley EmMkts Breakout Ntns C 6
Invesco Oppenheimer Main Street R5 Invesco Oppenheimer Main Street R5 6
Invesco Oppenheimer Main Street Y Invesco Oppenheimer Main Street Y 6
Invesco Oppenheimer Main Strt All Cap R5 Invesco Oppenheimer Main Strt All Cap R5 6
Invesco Oppenheimer Main Strt All Cap R6 Invesco Oppenheimer Main Strt All Cap R6 6
..
Virtus AllianzGI Emerging Markets Opps P Virtus AllianzGI Emerging Markets Opps P 1
Virtus AllianzGI Emerging Markets Opps C Virtus AllianzGI Emerging Markets Opps C 1
Virtus AllianzGI Emerging Markets Opps A Virtus AllianzGI Emerging Markets Opps A 1
Virtus AllianzGI EM Opps R6 Virtus AllianzGI EM Opps R6 1
Catholic Investor Global Real Estt I Catholic Investor Global Real Estt I 1
Name: FI_ShareclassName, Length: 2161, dtype: int64
origin_len=len(df)
df.drop(partial_share_missing.index, inplace=True)
print("Remaining rows:",len(df),"(",origin_len,"-",len(partial_share_missing),")")
Remaining rows: 93718 ( 101260 - 7542 )
for date_col in df.filter(regex="Date.*",axis=1).columns:
print('Number of empty dates for columns',date_col,":",len(df[df[date_col].isnull()]))
df[df['FP_PerformanceAs-OfDate'].isnull()]
Number of empty dates for columns FI_ShareclassInceptionDate : 0 Number of empty dates for columns FI_OldestShareInceptionDate : 0 Number of empty dates for columns FI_PortfolioHoldingsAs-OfDate : 0 Number of empty dates for columns FP_PerformanceAs-OfDate : 4
| FI_ShareclassName | FI_Ticker | FI_FundName | FI_AssetManager | FI_ShareclassType | FI_ShareclassInceptionDate | FI_CategoryGroup | FI_OldestShareInceptionDate | FI_ShareclassTickers | FI_PortfolioHoldingsAs-OfDate | ... | P_AllFlaggedHR_a | P_PrisonIndustryHR_c | P_PrisonIndustryHR_w | P_PrisonIndustryHR_a | P_BorderIndustryHR_c | P_BorderIndustryHR_w | P_BorderIndustryHR_a | P_PrivatePrisonOperators_c | P_PrivatePrisonOperators_w | P_PrivatePrisonOperators_a | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 26019 | Putnam Global Health Care R6 | PCHSX | Putnam Global Health Care Fund | Putnam | Open-end mutual fund | 2020-06-01 | Sector Equity Funds | 1982-05-28 | PCHSX, PGHAX, PHSBX, PHSRX, PHSTX, PHSYX | 2020-03-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 27722 | Wells Fargo Fundamental Small Cap Gr R6 | EGRYX | Wells Fargo Fundamental Small Cap Growth Fund | Wells Fargo Funds | Open-end mutual fund | 2020-06-01 | U.S. Equity Fund | 1995-06-05 | EGRYX, EGWAX, EGWCX, EGWDX, EGWRX | 2020-04-30 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 27754 | Wells Fargo Intrinsic Small Cap Value R6 | WFSMX | Wells Fargo Intrinsic Small Cap Value Fund | Wells Fargo Funds | Open-end mutual fund | 2020-06-01 | U.S. Equity Fund | 2005-04-08 | WFSDX, WFSJX, WFSMX, WFSSX, WSCDX | 2020-04-30 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 27791 | Wells Fargo Opportunity R6 | WOFRX | Wells Fargo Opportunity Fund | Wells Fargo Funds | Open-end mutual fund | 2020-06-01 | U.S. Equity Fund | 2000-02-24 | SOPVX, WFOPX, WOFDX, WOFNX, WOFRX | 2020-04-30 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
4 rows × 111 columns
filter=df[df['FP_PerformanceAs-OfDate'].isnull()]
df.loc[filter.index-1,['FP_PerformanceAs-OfDate','FI_PortfolioHoldingsAs-OfDate']]
| FP_PerformanceAs-OfDate | FI_PortfolioHoldingsAs-OfDate | |
|---|---|---|
| 26018 | 2020-05-31 | 2020-03-31 |
| 27721 | 2020-05-31 | 2020-04-30 |
| 27753 | 2020-05-31 | 2020-04-30 |
| 27790 | 2020-05-31 | 2020-04-30 |
df.loc[filter.index,'FP_PerformanceAs-OfDate']=df.loc[filter.index-1,'FP_PerformanceAs-OfDate']
df[df['FP_PerformanceAs-OfDate'].isnull()]
| FI_ShareclassName | FI_Ticker | FI_FundName | FI_AssetManager | FI_ShareclassType | FI_ShareclassInceptionDate | FI_CategoryGroup | FI_OldestShareInceptionDate | FI_ShareclassTickers | FI_PortfolioHoldingsAs-OfDate | ... | P_AllFlaggedHR_a | P_PrisonIndustryHR_c | P_PrisonIndustryHR_w | P_PrisonIndustryHR_a | P_BorderIndustryHR_c | P_BorderIndustryHR_w | P_BorderIndustryHR_a | P_PrivatePrisonOperators_c | P_PrivatePrisonOperators_w | P_PrivatePrisonOperators_a | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 26019 | Putnam Global Health Care R6 | PCHSX | Putnam Global Health Care Fund | Putnam | Open-end mutual fund | 2020-06-01 | Sector Equity Funds | 1982-05-28 | PCHSX, PGHAX, PHSBX, PHSRX, PHSTX, PHSYX | 2020-03-31 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 27722 | Wells Fargo Fundamental Small Cap Gr R6 | EGRYX | Wells Fargo Fundamental Small Cap Growth Fund | Wells Fargo Funds | Open-end mutual fund | 2020-06-01 | U.S. Equity Fund | 1995-06-05 | EGRYX, EGWAX, EGWCX, EGWDX, EGWRX | 2020-04-30 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 27754 | Wells Fargo Intrinsic Small Cap Value R6 | WFSMX | Wells Fargo Intrinsic Small Cap Value Fund | Wells Fargo Funds | Open-end mutual fund | 2020-06-01 | U.S. Equity Fund | 2005-04-08 | WFSDX, WFSJX, WFSMX, WFSSX, WSCDX | 2020-04-30 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 27791 | Wells Fargo Opportunity R6 | WOFRX | Wells Fargo Opportunity Fund | Wells Fargo Funds | Open-end mutual fund | 2020-06-01 | U.S. Equity Fund | 2000-02-24 | SOPVX, WFOPX, WOFDX, WOFNX, WOFRX | 2020-04-30 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
4 rows × 111 columns
def checkuniquevalues(df, cols):
#Check unique values
for col in cols:
print(col,": Total unique:",len(df[col].sort_values().unique())," - Values:",df[col].sort_values().unique())
checkuniquevalues(df, ordinal+nominal)
#for col in cols:
# values=""
# for elem in df[col].sort_values().unique():
# values=values+"'"+str(elem)+"':'"+str(elem)+"', "
T_TobaccoGrade : Total unique: 6 - Values: ['A' 'B' 'C' 'D' 'E' 'F'] G_CivilianFirearmGrade : Total unique: 5 - Values: ['A' 'B' 'C' 'D' 'F'] W_MilitaryWeaponGrade : Total unique: 5 - Values: ['A' 'B' 'C' 'D' 'F'] D_DeforestationGrade : Total unique: 6 - Values: ['A' 'B' 'C' 'D' 'E' 'F'] F_FossilFuelGrade : Total unique: 6 - Values: ['A' 'B' 'C' 'D' 'F' nan] P_PrisonIndustrialComplexGrade : Total unique: 6 - Values: ['A' 'B' 'C' 'D' 'F' nan] GE_GenderEqualityGrade : Total unique: 6 - Values: ['A' 'B' 'C' 'D' 'F' nan] FI_ShareclassType : Total unique: 2 - Values: ['ETF' 'Open-end mutual fund'] FI_FundName : Total unique: 2863 - Values: ['1290 SmartBeta Equity Fund' '13D Activist Fund' '1919 Socially Responsive Balanced Fund' ... 'iShares U.S. Telecommunications ETF' 'iShares U.S. Utilities ETF' 'iShares® ESG Advanced MSCI USA ETF'] FI_Ticker : Total unique: 8719 - Values: ['AAAAX' 'AAAPX' 'AAAQX' ... 'ZVNBX' 'ZVNIX' nan] FI_CategoryGroup : Total unique: 4 - Values: ['Allocation Funds' 'International Equity Funds' 'Sector Equity Funds' 'U.S. Equity Fund'] FI_ShareclassName : Total unique: 8886 - Values: ['1290 SmartBeta Equity A' '1290 SmartBeta Equity I' '1290 SmartBeta Equity R' ... 'iShares US Utilities ETF' 'iShares® ESG Advanced MSCI USA ETF' 'iShares® ESG MSCI EM Leaders ETF'] FI_ShareclassTickers : Total unique: 2901 - Values: ['AAAAX, AAAPX, AAAQX, AAASX, AAAVX, AAAWX, AAAZX' 'AABCX, PAADX, PAAEX, PAARX, PABAX, PABBX, PABYX' 'AACFX, AMCYX, CACFX, CACSX, IACFX' ... 'ZVGIX, ZVGNX' 'ZVNBX, ZVNIX' nan] FI_AssetManager : Total unique: 181 - Values: ['1290 Funds' '13D Activist Fund' '1919 Funds' 'AGF Investments' 'AIG' 'ALPS' 'ARK ETF Trust' 'Aberdeen' 'Acadian Funds' 'Adirondack Funds' 'Advisors Preferred' 'Akre' 'Alger' 'AllianceBernstein' 'Allianz Global Investors' 'Alpha Architect' 'Amana' 'American Century Investments' 'American Funds' 'American Trust' 'Amplify ETFs' 'Amplifyetfs' 'Aperture Investors' 'Appleseed Fund' 'Ariel Investments' 'Artisan' 'Ashmore' 'Aspiration Funds' 'Ave Maria Mutual Funds' 'Azzad Fund' 'BMO Funds' 'BNY Mellon' 'Baillie Gifford Funds' 'Baron Capital Group' 'Baywood' 'Beyond Advisors IC' 'BlackRock/iShares' 'Boston Common' 'Boston Trust Walden Funds' 'Brandes' 'Bridge Builder' 'Bridgeway' 'Brown Advisory Funds' 'Calamos' 'Calvert Research and Management' 'Catholic Investor' 'Causeway' 'Change Finance' 'City National Rochdale' 'Clark Fork Trust' 'Coho' 'Columbia' 'Columbia Threadneedle' 'Cornerstone' 'Crossmark Steward Funds' 'Cushing Funds' 'DWS' 'Dana Investment' 'Delaware Funds by Macquarie' 'Dimensional Fund Advisors' 'Dodge & Cox' 'Domini' 'Driehaus' 'ETFMG' 'Eaton Vance' 'Essex Funds' 'Eventide Funds' 'Federated' 'Fidelity Investments' 'First Eagle' 'First Trust' 'Firsthand Funds' 'Fisher Investments' 'Flexshares Trust' 'Franklin Templeton' 'Franklin Templeton Investments' 'Frontier Funds' 'GMO' 'Gabelli' 'Glenmede' 'Global X Funds' 'Goldman Sachs' 'Gotham' 'Great Lakes Funds' 'Great-West Funds' 'Green Century' 'GuideStone Funds' 'Guinness Atkinson' 'Harbor' 'Hartford Funds' 'Hartford Mutual Funds' 'Highland Funds' 'Impact Shares' 'IndexIQ' 'Inspire' 'Invesco' 'Ivy Funds' 'JPMorgan' 'Jackson National' 'Janus Henderson' 'Jensen' 'John Hancock' 'KBI' 'Kennedy Capital Management' 'KraneShares' 'LKCM' 'Lateef' 'Lazard' 'Legg Mason' 'Lord Abbett' 'MFS' 'MainStay' 'MassMutual' 'Matthews Asia Funds' 'Meridian' 'Mesirow Financial' 'Morgan Stanley' 'Nationwide' 'Natixis Funds' 'Neuberger Berman' 'New Alternatives' 'New Covenant' 'Northern Funds' "O'Shares Investments" 'Oakmark' 'Old Westbury' 'PGIM Funds (Prudential)' 'PIMCO' 'Parnassus' 'Pax World' 'Pear Tree Funds' 'Pioneer Investments' 'Polen Capital' 'Praxis Mutual Funds' 'Preserver Funds' 'Principal Funds' 'ProShares' 'Putnam' 'Pzena' 'Quaker' 'RBC Global Asset Management.' 'REMSGroup' 'ReyndersMcVeigh Funds' 'Riverbridge' 'Russell' 'SEI' 'SPDR State Street Global Advisors' 'Saturna Sustainable Funds' 'Schroder' 'Schwab ETFs' 'Schwab Funds' 'Segall Bryant & Hamill' 'Shelton Capital Management' 'Sit' 'Sterling Capital Funds' 'Summit Global Investments' 'T. Rowe Price' 'TCW' 'TIAA Investments/Nuveen' 'Thornburg' 'Timothy Plan' 'Tortoise Capital Advisors' 'Touchstone' 'Towle' 'Transamerica' 'Trillium Mutual Funds' 'TrueMark Investments' 'TrueShares' 'UBS Asset Management' 'VALIC' 'VanEck' 'Vanguard' 'Vert Asset Management' 'Victory Capital' 'Virtus' 'Voya' 'WCM Investment Management' 'Wells Fargo Funds' 'WisdomTree' 'Xtrackers' 'Zevenbergen Capital Investments']
df.drop(columns=['FI_Ticker','FI_ShareclassTickers','FI_ShareclassName', 'FI_FundName', 'FI_AssetManager'], axis=1, inplace=True)
nominal.remove('FI_Ticker')
nominal.remove('FI_ShareclassTickers')
nominal.remove('FI_ShareclassName')
nominal.remove('FI_FundName')
nominal.remove('FI_AssetManager')
#df.to_csv('/kaggle/input/fossil-free-funds/prep/fossilfund_dataset_clean.csv', index=False)
#df.to_csv('~/Downloads/fossilfund_dataset_clean.csv', index=False)
categories=cols_df['Category'].unique()
for category in categories:
#index_cols=list(set(cols_df[cols_df['Category']==category]['Short column name']) & set(df.columns))
index_cols=getColCategory(category)
length=len(df[index_cols].select_dtypes(exclude=object).columns)
print("Histogram for "+category+" features")
df[index_cols].hist(color='g', bins=50, grid=False, figsize=(length*2,length))
plt.tight_layout()
plt.show()
Histogram for Fund information features
Histogram for Financial performance features
Histogram for Fossil energy features
Histogram for Deforestation features
Histogram for Gender Equality features
Histogram for Gun features
Histogram for Weapon features
Histogram for Tobacco features
Histogram for Prison features
# (C) Preprocessing function
def df_wo_zeros_null(df):
df = df.copy()
# Continuous
# Add additional column for holding 0 values
# Filter-out zero values
for c in list(continuous_zeros)+list(discrete_zeros):
name = c + "_isempty"
idx= df[c]==0
df[name] = idx
#Convert bool col as int
df[name] = df[name].astype(int)
df[c] = df[~idx][c]
# Fill missing values
for c in list(set(continuous + discrete) & set(df.select_dtypes(np.number).columns)):
df[c].dropna(inplace=True)
return df
from sklearn.preprocessing import QuantileTransformer
#continuous+discrete
cols= list(set(continuous) & set(df.select_dtypes(np.number).columns))
temp_df=df_wo_zeros_null(df)
for category in categories:
#index_cols=list(set(cols_df[cols_df['Category']==category]['Short column name']) & set(df.columns))
index_cols=list( set(getColCategory(category)) & set(cols))
length=len(index_cols)
for d in [1, 0.5, 2, 3]:
test_df=temp_df[index_cols].copy()
for c in test_df.columns:
name = '{}**{}'.format(c, d)
test_df[name]=test_df[c]**d
test_df.drop(c, axis=1, inplace=True)
test_df.hist(color='g', bins=30, grid=False, figsize=((length*1.2)+10,length+3))
#test_df[test_df>0].hist(color='g', bins=30, grid=False, figsize=(length*2,length))
#quantile = QuantileTransformer(output_distribution='normal')
#test_df=df[index_cols]
#test_df[index_cols]=quantile.fit_transform(test_df[index_cols])
#test_df.hist(color='g', bins=30, grid=False, figsize=((length*1.2)+10,length+3))
#log1p
if(category != 'Gender Equality'):
test_df=np.log1p(df[index_cols].copy())
test_df.columns = [str(col) + '_log1p' for col in test_df.columns]
test_df.hist(color='g', bins=30, grid=False, figsize=((length*1.2)+10,length+3))
plt.tight_layout()
plt.show()
from scipy.stats import boxcox
special_distrib=['FI_PercentRated','F_CarbonMarketValueWeight','GE_WeightOfHoldings']
length=len(special_distrib)
test_df=df[special_distrib].copy()
for feature in special_distrib:
name = 'expm1({})'.format(feature)
test_df[name]=(1-test_df[feature])**0.5
#test_df[name]=boxcox(test_df[feature], 0.3)
test_df.drop(feature, axis=1, inplace=True)
test_df.hist(color='g', bins=30, grid=False, figsize=((length*1.2)+10,length+3))
plt.tight_layout()
plt.show()
cols= list(set(continuous) & set(df.select_dtypes(np.number).columns))
preprocess_df=df_wo_zeros_null(df)
continuous_log1p=[]
continuous_exp05=[]
continuous_exp1_05=[]
for category in categories:
#index_cols=list(set(cols_df[cols_df['Category']==category]['Short column name']) & set(df.columns))
index_cols=list( set(getColCategory(category)) & set(cols))
length=len(index_cols)
test_df=preprocess_df[index_cols].copy()
for c in test_df.columns:
encoding=getEncoding(c)
if(encoding == "log1p"):
name = 'log1p({})'.format(c)
test_df[name]=np.log1p(test_df[c])
test_df.drop(c, axis=1, inplace=True)
continuous_log1p.append(c)
elif (encoding == "^0.5"):
name = '{}**{}'.format(c, '0.5')
test_df[name]=test_df[c]**0.5
test_df.drop(c, axis=1, inplace=True)
continuous_exp05.append(c)
elif (encoding == "(1-x)^0.5"):
name = '(1-{})^0.5'.format(c)
test_df[name]=(1-test_df[c])**0.5
test_df.drop(c, axis=1, inplace=True)
continuous_exp1_05.append(c)
test_df.hist(color='g', bins=30, grid=False, figsize=((length*1.2)+10,length+3))
plt.tight_layout()
plt.show()
outliers_threshold=3
# (C) Preprocessing function
def preprocess_numerical(df):
df = df.copy()
# Continuous
# Add additional column for holding 0 values
# Filter-out zero values
for c in list(continuous_zeros)+list(discrete_zeros):
name = c + "_isempty"
idx= df[c]==0
df[name] = idx
#Convert bool col as int
df[name] = df[name].astype(int)
df[c] = df[~idx][c]
# Apply feature encoding
df[continuous_log1p]=np.log1p(df[continuous_log1p])
df[continuous_exp05]=df[continuous_exp05]**0.5
df[continuous_exp1_05]=(1-df[continuous_exp1_05])**0.5
# Apply z-scores for data with outliers
for c in continuous:
z_scores = (df[c] - df[c].mean()) / df[c].std()
idx = (np.abs(z_scores) > outliers_threshold)
df[c] = df[~idx][c]
# Fill missing values
for c in list(set(continuous + discrete) & set(df.select_dtypes(np.number).columns)):
df[c].fillna(df[c].median(), inplace=True)
#Replace dates
for date_col in date_cols:
df[date_col]=pd.to_numeric(df[date_col].apply(pd.to_datetime, errors='coerce'))
return df
preprocess_df=preprocess_numerical(df)
cols= list(set(continuous) & set(df.select_dtypes(np.number).columns))
for category in categories:
index_cols=list( set(getColCategory(category)) & set(cols))
length=len(index_cols)
print("Histogram for "+category+" features")
preprocess_df[index_cols].hist(color='g', bins=50, grid=False, figsize=(length*2,length))
plt.tight_layout()
plt.show()
Histogram for Fund information features
Histogram for Financial performance features
Histogram for Fossil energy features
Histogram for Deforestation features
Histogram for Gender Equality features
Histogram for Gun features
Histogram for Weapon features
Histogram for Tobacco features
Histogram for Prison features
print("We had", len(df.columns), "features before peprocessing numerical")
print("After processing, we have a total of", len(preprocess_df.columns), "features")
print("Number of null values in the dataframe:", preprocess_df[discrete+continuous].isnull().sum().sum())
We had 106 features before peprocessing numerical After processing, we have a total of 184 features Number of null values in the dataframe: 0
for c in preprocess_df.columns:
print (c)
FI_ShareclassType FI_ShareclassInceptionDate FI_CategoryGroup FI_OldestShareInceptionDate FI_PortfolioHoldingsAs-OfDate FI_FundNetAssets FI_PercentRated F_FossilFuelGrade F_FossilFuelHoldings_c F_FossilFuelHoldings_w F_FossilFuelHoldings_a F_CarbonUnderground_c F_CarbonUnderground_w F_CarbonUnderground_a F_CoalIndustry_c F_CoalIndustry_w F_CoalIndustry_a F_Oil/GasIndustry_c F_Oil/GasIndustry_w F_Oil/GasIndustry_a F_30Coal-FiredUtilities_c F_30Coal-FiredUtilities_w F_30Coal-FiredUtilities_a F_Fossil-FiredUtilities_c F_Fossil-FiredUtilities_w F_Fossil-FiredUtilities_a F_RelativeCarbonFootprint F_RelativeCarbonIntensity F_TotalEmissions1+2 F_TotalEmissions1+2+3 F_CarbonMarketValueWeight F_CarbonPortfolioCoverage F_Clean200_c F_Clean200_w F_Clean200_a D_DeforestationGrade D_RiskProducer_c D_RiskProducer_w D_RiskProducer_a D_RiskFinancier_c D_RiskFinancier_w D_RiskFinancier_a D_RiskConsumerBrand_c D_RiskConsumerBrand_w D_RiskConsumerBrand_a GE_GenderEqualityGrade GE_GenderEqualityRanking GE_CountOfHoldings GE_WeightOfHoldings G_CivilianFirearmGrade G_CivilianFirearm_c G_CivilianFirearm_w G_CivilianFirearm_a G_GunManufacturer_c G_GunManufacturer_w G_GunManufacturer_a G_GunRetailer_c G_GunRetailer_w G_GunRetailer_a W_MilitaryWeaponGrade W_MilitaryWeapon_c W_MilitaryWeapon_w W_MilitaryWeapon_a W_MilitaryContractors_c W_MilitaryContractors_w W_MilitaryContractors_a W_NuclearWeapons_c W_NuclearWeapons_w W_NuclearWeapons_a W_ClusterMunitions_c W_ClusterMunitions_w W_ClusterMunitions_a T_TobaccoGrade T_TobaccoProducer_c T_TobaccoProducer_w T_TobaccoProducer_a T_Tobacco-Promoting_c T_Tobacco-Promoting_w T_Tobacco-Promoting_a FP_PerformanceAs-OfDate FP_ReturnsY1 FP_ReturnsY3 FP_ReturnsY5 FP_ReturnsY10 P_PrisonIndustrialComplexGrade P_AllFlagged_c P_AllFlagged_w P_AllFlagged_a P_PrisonIndustry_c P_PrisonIndustry_w P_PrisonIndustry_a P_BorderIndustry_c P_BorderIndustry_w P_BorderIndustry_a P_AllFlaggedHR_c P_AllFlaggedHR_w P_AllFlaggedHR_a P_PrisonIndustryHR_c P_PrisonIndustryHR_w P_PrisonIndustryHR_a P_BorderIndustryHR_c P_BorderIndustryHR_w P_BorderIndustryHR_a P_PrivatePrisonOperators_c P_PrivatePrisonOperators_w P_PrivatePrisonOperators_a F_Clean200_w_isempty D_RiskProducer_a_isempty F_CoalIndustry_w_isempty G_GunManufacturer_a_isempty P_BorderIndustryHR_w_isempty F_CarbonUnderground_a_isempty D_RiskFinancier_w_isempty G_GunManufacturer_w_isempty P_AllFlagged_w_isempty D_RiskFinancier_a_isempty P_AllFlagged_a_isempty W_MilitaryWeapon_w_isempty G_CivilianFirearm_w_isempty W_ClusterMunitions_w_isempty F_30Coal-FiredUtilities_w_isempty T_TobaccoProducer_a_isempty F_Oil/GasIndustry_w_isempty P_BorderIndustry_w_isempty D_RiskProducer_w_isempty P_PrisonIndustry_a_isempty F_30Coal-FiredUtilities_a_isempty P_AllFlaggedHR_a_isempty P_PrisonIndustryHR_w_isempty P_PrisonIndustryHR_a_isempty W_MilitaryContractors_a_isempty W_NuclearWeapons_w_isempty F_Clean200_a_isempty F_CoalIndustry_a_isempty P_BorderIndustry_a_isempty F_Fossil-FiredUtilities_w_isempty F_FossilFuelHoldings_a_isempty D_RiskConsumerBrand_a_isempty P_PrisonIndustry_w_isempty P_PrivatePrisonOperators_w_isempty F_Oil/GasIndustry_a_isempty T_Tobacco-Promoting_a_isempty D_RiskConsumerBrand_w_isempty G_CivilianFirearm_a_isempty P_PrivatePrisonOperators_a_isempty G_GunRetailer_a_isempty W_MilitaryWeapon_a_isempty F_Fossil-FiredUtilities_a_isempty F_FossilFuelHoldings_w_isempty F_CarbonUnderground_w_isempty T_TobaccoProducer_w_isempty P_AllFlaggedHR_w_isempty W_MilitaryContractors_w_isempty W_NuclearWeapons_a_isempty W_ClusterMunitions_a_isempty P_BorderIndustryHR_a_isempty G_GunRetailer_w_isempty T_Tobacco-Promoting_w_isempty G_GunRetailer_c_isempty P_BorderIndustryHR_c_isempty W_MilitaryContractors_c_isempty P_PrisonIndustryHR_c_isempty F_Oil/GasIndustry_c_isempty P_BorderIndustry_c_isempty F_30Coal-FiredUtilities_c_isempty P_PrisonIndustry_c_isempty T_TobaccoProducer_c_isempty F_FossilFuelHoldings_c_isempty G_GunManufacturer_c_isempty F_CarbonUnderground_c_isempty P_PrivatePrisonOperators_c_isempty W_ClusterMunitions_c_isempty W_MilitaryWeapon_c_isempty P_AllFlaggedHR_c_isempty T_Tobacco-Promoting_c_isempty F_CoalIndustry_c_isempty D_RiskConsumerBrand_c_isempty F_Clean200_c_isempty D_RiskFinancier_c_isempty D_RiskProducer_c_isempty W_NuclearWeapons_c_isempty F_Fossil-FiredUtilities_c_isempty G_CivilianFirearm_c_isempty P_AllFlagged_c_isempty
def ordinal_mapping(df, cols, dictionary):
for col in cols:
df[col]=df[col].map(dictionary)
return df
#grade_cols=df.filter(regex="Grade",axis=1).columns
#checkuniquevalues(df, grade_cols)
def preprocessing_categorical(df):
df = df.copy()
# convert ordinal to int columns
ordinal_mapping(df, ordinal, {'A':6, 'B':5, 'C':4, 'D':3, 'E':2, 'F':1, np.nan:0})
# One-hot encoding
df = pd.get_dummies(df, columns=nominal, dummy_na=False)
return df
preprocess_df=preprocessing_categorical(preprocess_df)
print("After processing, we have a total of", len(preprocess_df.columns), "features")
After processing, we have a total of 188 features
def compareAfter_preprocess(df_origin, df_new):
number_previous_col=0
for col in df_new.columns:
if(col in df_origin.columns ):
if(not col in continuous):
number_previous_col=number_previous_col+1
if(len( list(set(df_new[col].unique()) -set(df_origin[col].unique()) )) >0):
print(col,"- difference of value mapping :",list(set(df_new[col].unique()) -set(df_origin[col].unique())))
else:
print(col,"- new column")
compareAfter_preprocess(df,preprocess_df)
C:\Users\Thinkpad\AppData\Local\Temp/ipykernel_14764/4240346215.py:7: DeprecationWarning: elementwise comparison failed; this will raise an error in the future. if(len( list(set(df_new[col].unique()) -set(df_origin[col].unique()) )) >0): C:\Users\Thinkpad\AppData\Local\Temp/ipykernel_14764/4240346215.py:8: DeprecationWarning: elementwise comparison failed; this will raise an error in the future. print(col,"- difference of value mapping :",list(set(df_new[col].unique()) -set(df_origin[col].unique())))
FI_ShareclassInceptionDate - difference of value mapping : [1415750400000000000, 1325030400000000000, 721008000000000000, 736560000000000000, 1355184000000000000, 1216857600000000000, 1510704000000000000, 1481846400000000000, 1530057600000000000, 1548979200000000000, 1072742400000000000, 1128038400000000000, 641433600000000000, 1470873600000000000, 995328000000000000, 564019200000000000, 1313712000000000000, 1511136000000000000, 1538438400000000000, 1488758400000000000, 913680000000000000, 869443200000000000, 847324800000000000, 991094400000000000, 1024272000000000000, 1112745600000000000, 1544054400000000000, 1145923200000000000, 615081600000000000, 885254400000000000, 1593043200000000000, 728784000000000000, 1075334400000000000, 1274400000000000000, 1296518400000000000, 1451347200000000000, 1108512000000000000, 1506643200000000000, 1561939200000000000, 997920000000000000, 644025600000000000, 865209600000000000, 919900800000000000, 1253836800000000000, 1451260800000000000, 717206400000000000, 219542400000000000, 1248048000000000000, 1060041600000000000, 1181692800000000000, 827798400000000000, 1424995200000000000, 783561600000000000, 1491350400000000000, 1292284800000000000, 1533168000000000000, 1560470400000000000, 879984000000000000, 907286400000000000, 1485907200000000000, 1531353600000000000, 779328000000000000, 1133222400000000000, 1398643200000000000, 1442880000000000000, 646617600000000000, 1022630400000000000, 1055808000000000000, 945216000000000000, 1365465600000000000, 547084800000000000, 741916800000000000, 1217462400000000000, 1394409600000000000, 1106870400000000000, 443318400000000000, 929923200000000000, -1215561600000000000, 542851200000000000, 1328054400000000000, 1516060800000000000, 1391385600000000000, 1434412800000000000, 1080518400000000000, 969926400000000000, 1213228800000000000, 925689600000000000, 383788800000000000, 1025222400000000000, 1202169600000000000, 1511827200000000000, 439084800000000000, 1596153600000000000, 718243200000000000, 235180800000000000, 1235952000000000000, 909360000000000000, 512265600000000000, 1275350400000000000, 1385942400000000000, 1562889600000000000, 1009929600000000000, 1485475200000000000, 844041600000000000, 998870400000000000, 1430179200000000000, 788745600000000000, 1317859200000000000, 991267200000000000, 1556236800000000000, 1569888000000000000, 1059523200000000000, 1427068800000000000, 1454371200000000000, 1297900800000000000, 1481673600000000000, 574387200000000000, 1016755200000000000, 1204761600000000000, -476236800000000000, 740275200000000000, 762393600000000000, 1536537600000000000, 1359590400000000000, 386380800000000000, 1459123200000000000, 1325203200000000000, 1338854400000000000, 1522627200000000000, -63072000000000000, 1536278400000000000, 1034640000000000000, 1277942400000000000, 968284800000000000, 835574400000000000, 1001462400000000000, 1167350400000000000, 1067817600000000000, 1532304000000000000, 1145232000000000000, 1244764800000000000, 1414454400000000000, 499564800000000000, 1373241600000000000, 1461715200000000000, 930873600000000000, 1008288000000000000, 919814400000000000, 377913600000000000, 1539129600000000000, 1450656000000000000, 875577600000000000, 1054252800000000000, 884131200000000000, 1067904000000000000, 823219200000000000, 510278400000000000, 694051200000000000, 1391126400000000000, 1291593600000000000, 1380067200000000000, 1004054400000000000, 1545955200000000000, 1335830400000000000, 749692800000000000, 1158883200000000000, 417916800000000000, 1446422400000000000, 1102550400000000000, 1340928000000000000, 1014336000000000000, 1198108800000000000, 912470400000000000, 1293667200000000000, 435801600000000000, 1254182400000000000, 1342656000000000000, 402624000000000000, 1464307200000000000, 1364774400000000000, 1486425600000000000, 1309478400000000000, 1021939200000000000, 1519603200000000000, 1477440000000000000, 980726400000000000, 1178150400000000000, 851558400000000000, 586396800000000000, 1559606400000000000, 951350400000000000, 1305244800000000000, 685929600000000000, 1128297600000000000, 918172800000000000, 1415836800000000000, 741225600000000000, 1404777600000000000, 811641600000000000, 1165536000000000000, 753062400000000000, -38966400000000000, 969235200000000000, 1588550400000000000, 1135123200000000000, -114566400000000000, 504748800000000000, 991353600000000000, 781228800000000000, 1489017600000000000, 1477958400000000000, 1024531200000000000, 1233792000000000000, 879897600000000000, 1247443200000000000, 907200000000000000, 920851200000000000, 1458518400000000000, 791683200000000000, 281318400000000000, 533347200000000000, 1506902400000000000, 1064534400000000000, 1584316800000000000, 1396310400000000000, 909705600000000000, 1197244800000000000, 1529020800000000000, 1551139200000000000, 942883200000000000, 522633600000000000, 1309392000000000000, 1493164800000000000, 1166572800000000000, 656208000000000000, 1193875200000000000, 1023753600000000000, 1207526400000000000, 1262131200000000000, 1170892800000000000, 728524800000000000, 1425254400000000000, 960768000000000000, 1038182400000000000, 1513728000000000000, 1358899200000000000, 1292544000000000000, 1480550400000000000, 938649600000000000, 765417600000000000, 425174400000000000, 1003795200000000000, 1541462400000000000, 24019200000000000, 735350400000000000, 1443139200000000000, 646876800000000000, 536284800000000000, 724291200000000000, 967593600000000000, 1033948800000000000, -647049600000000000, 1465257600000000000, 779587200000000000, 1392336000000000000, 1222214400000000000, 1501545600000000000, 1147651200000000000, 834710400000000000, 1051833600000000000, 1162425600000000000, 808531200000000000, 1151366400000000000, 1228780800000000000, 1427846400000000000, 996537600000000000, 1516320000000000000, 1571616000000000000, 1569801600000000000, 1229558400000000000, 1256860800000000000, 1440633600000000000, 1454284800000000000, 1223251200000000000, 970185600000000000, 1434672000000000000, 1346198400000000000, 914889600000000000, 1578441600000000000, 870652800000000000, 959126400000000000, 1456790400000000000, 1447977600000000000, 1121385600000000000, 951264000000000000, 1488931200000000000, 1332460800000000000, 1543536000000000000, 1557187200000000000, 876700800000000000, 1230595200000000000, 720230400000000000, 1419379200000000000, 656294400000000000, 988070400000000000, 1153958400000000000, 1032307200000000000, 1574208000000000000, 866419200000000000, 556761600000000000, 1430438400000000000, 1220313600000000000, 1496275200000000000, 1326153600000000000, 972259200000000000, 999561600000000000, 1537228800000000000, 1564531200000000000, 870393600000000000, 1237939200000000000, 1278892800000000000, 47088000000000000, 754876800000000000, 751593600000000000, 1415145600000000000, 917481600000000000, 1293494400000000000, 652060800000000000, 1028073600000000000, 1337731200000000000, 1536796800000000000, 729475200000000000, 1249257600000000000, 1177027200000000000, 1401753600000000000, 721267200000000000, 1351728000000000000, 1143417600000000000, 1477267200000000000, 747360000000000000, 559353600000000000, 902188800000000000, 835833600000000000, 979603200000000000, 1112313600000000000, 824774400000000000, 1521504000000000000, 791596800000000000, 1551916800000000000, 844128000000000000, 1381795200000000000, -346723200000000000, 1266278400000000000, 1109808000000000000, 1178064000000000000, 1559260800000000000, 1296086400000000000, 1528329600000000000, 820540800000000000, 986428800000000000, 1517270400000000000, 212284800000000000, 1329264000000000000, 1417737600000000000, 1030665600000000000, 1218672000000000000, 1103500800000000000, 1512000000000000000, 1552953600000000000, 1137024000000000000, 1490918400000000000, 860544000000000000, 738892800000000000, 1446681600000000000, 1203379200000000000, 1313971200000000000, 871603200000000000, 849484800000000000, 1004313600000000000, 1179100800000000000, 1532995200000000000, 838857600000000000, 1376524800000000000, 1560297600000000000, 1403827200000000000, 907113600000000000, 1418083200000000000, 1288310400000000000, 1055376000000000000, 1409270400000000000, 1044316800000000000, 867369600000000000, 767836800000000000, 1210204800000000000, 1387152000000000000, 1442448000000000000, 1000080000000000000, 1088553600000000000, 1356566400000000000, 985305600000000000, 859852800000000000, 779414400000000000, 717033600000000000, 376790400000000000, 1465776000000000000, 1125532800000000000, 1493078400000000000, 812592000000000000, 1150675200000000000, 1051142400000000000, 1228089600000000000, 973728000000000000, 1548806400000000000, 1194912000000000000, 1537747200000000000, 1360800000000000000, 1006905600000000000, 1172793600000000000, 1561334400000000000, 1037318400000000000, 1404864000000000000, 1119225600000000000, 1343952000000000000, 1527724800000000000, 1003708800000000000, 770428800000000000, 1201737600000000000, 1013731200000000000, 1533513600000000000, 914198400000000000, 1378684800000000000, 1544572800000000000, 1002672000000000000, 449712000000000000, 1500336000000000000, 874540800000000000, 1228435200000000000, 901843200000000000, -1207872000000000000, 942796800000000000, 997401600000000000, 1535068800000000000, 1364947200000000000, 854582400000000000, 1038355200000000000, 684460800000000000, 1222128000000000000, -1135987200000000000, 1120089600000000000, 921024000000000000, 854668800000000000, 1540339200000000000, 545011200000000000, 1230681600000000000, 1573516800000000000, 1551398400000000000, 909964800000000000, 1501459200000000000, 977443200000000000, 1188518400000000000, 1372291200000000000, 848275200000000000, 861926400000000000, 1229472000000000000, 1073001600000000000, 902880000000000000, 905731200000000000, 1525046400000000000, 1060560000000000000, 1149033600000000000, 618192000000000000, 1137974400000000000, 1215388800000000000, 850435200000000000, 1370217600000000000, 750902400000000000, 957484800000000000, 1508803200000000000, 1352332800000000000, -587260800000000000, 1536105600000000000, 828316800000000000, 1379635200000000000, 1209513600000000000, 1039392000000000000, 1053043200000000000, 1420588800000000000, 712800000000000000, 923875200000000000, 399859200000000000, 583632000000000000, 1475193600000000000, 1121299200000000000, 1305072000000000000, 1134950400000000000, 1488844800000000000, 978480000000000000, 1177977600000000000, 1443398400000000000, 1078444800000000000, 879379200000000000, 945734400000000000, 808358400000000000, 370656000000000000, 901497600000000000, 1144800000000000000, 1023148800000000000, 1005782400000000000, 1359676800000000000, 468115200000000000, 509068800000000000, 692841600000000000, 1400630400000000000, 1230508800000000000, 536371200000000000, 747446400000000000, 1496188800000000000, 1537142400000000000, 377481600000000000, 985737600000000000, 1339632000000000000, 875145600000000000, 1483401600000000000, 764553600000000000, 1206921600000000000, 841968000000000000, 1450224000000000000, 1262217600000000000, 1224201600000000000, 870307200000000000, 1108684800000000000, 1190592000000000000, 1217894400000000000, 864000000000000000, 1517443200000000000, 1190851200000000000, 1075075200000000000, 1395100800000000000, 775785600000000000, 421891200000000000, 714614400000000000, 1156982400000000000, 564969600000000000, 857692800000000000, 1180569600000000000, 1534464000000000000, 1523404800000000000, 1069977600000000000, 716083200000000000, 891302400000000000, -993686400000000000, -1252022400000000000, 1579132800000000000, 1552348800000000000, 1441756800000000000, 1353283200000000000, 899856000000000000, 1519171200000000000, 1165276800000000000, 1065744000000000000, 446428800000000000, 888796800000000000, 1320105600000000000, 1130716800000000000, 1205280000000000000, -1183507200000000000, 1293753600000000000, 1017273600000000000, 1006214400000000000, 818208000000000000, 807148800000000000, 1238457600000000000, 973036800000000000, 1158019200000000000, 1328140800000000000, 1386201600000000000, 1212105600000000000, 747619200000000000, 1554940800000000000, 1543881600000000000, 1189987200000000000, 1267401600000000000, 1433289600000000000, 725500800000000000, 1344816000000000000, 891388800000000000, 1022544000000000000, 1415318400000000000, 1104451200000000000, 1471996800000000000, 253843200000000000, 1145404800000000000, 1329177600000000000, 662342400000000000, 1383782400000000000, 1285286400000000000, 411609600000000000, 1196812800000000000, 1185753600000000000, 1362700800000000000, -52876800000000000, 997747200000000000, 1351641600000000000, 1075161600000000000, 1429056000000000000, 744249600000000000, 587779200000000000, 1125446400000000000, 1309219200000000000, 1492992000000000000, 894412800000000000, 1225756800000000000, 1491177600000000000, 1303171200000000000, 1568592000000000000, 1115164800000000000, 761270400000000000, 1269993600000000000, 1181520000000000000, 1004572800000000000, 1258934400000000000, 1459382400000000000, 1146441600000000000, 602467200000000000, 878688000000000000, 1486944000000000000, 1575417600000000000, 867628800000000000, 1298937600000000000, 1564358400000000000, 1110931200000000000, 757036800000000000, 1376352000000000000, 922924800000000000, 1323907200000000000, 1235692800000000000, 1133827200000000000, 1317600000000000000, 1416355200000000000, 1062460800000000000, 531619200000000000, 1504828800000000000, 1538006400000000000, 1294704000000000000, 1372118400000000000, 1460592000000000000, 1272585600000000000, 730684800000000000, 1256688000000000000, 930096000000000000, 773625600000000000, 984700800000000000, 1209427200000000000, 1393200000000000000, 1246233600000000000, 704332800000000000, 1412121600000000000, 604800000000000000, 1301529600000000000, 1036108800000000000, 1025049600000000000, 1102464000000000000, 1190937600000000000, 1456358400000000000, 869184000000000000, 1447804800000000000, 1291334400000000000, 978393600000000000, 722217600000000000, 976579200000000000, 1518480000000000000, 1164585600000000000, 1330473600000000000, 1142467200000000000, 1053993600000000000, 954460800000000000, 865987200000000000, 1474243200000000000, 1436832000000000000, 640569600000000000, 983404800000000000, 618451200000000000, 1403654400000000000, 1049760000000000000, 1215648000000000000, 1558483200000000000, 673747200000000000, 1470009600000000000, 775699200000000000, 1443657600000000000, 735868800000000000, 813283200000000000, 1167177600000000000, 1510012800000000000, 824342400000000000, 1233532800000000000, 868579200000000000, 769046400000000000, 1122940800000000000, 1551744000000000000, 1408924800000000000, 1422576000000000000, 1436227200000000000, 769392000000000000, 599270400000000000, 1021420800000000000, 1096588800000000000, 1362009600000000000, 1538956800000000000, 742694400000000000, 1439424000000000000, 1350950400000000000, 820108800000000000, 1516838400000000000, 1505779200000000000, 1151884800000000000, 1388966400000000000, 878601600000000000, 1076025600000000000, 1259798400000000000, 1300752000000000000, 1185235200000000000, 1212537600000000000, 837993600000000000, 1457308800000000000, 1191888000000000000, 926467200000000000, 1014940800000000000, 992822400000000000, 373507200000000000, 450921600000000000, 1225065600000000000, 528336000000000000, 1375660800000000000, 933292800000000000, 1541548800000000000, 391392000000000000, 833760000000000000, 1530489600000000000, 1265068800000000000, 1077062400000000000, 723168000000000000, 988588800000000000, 1315440000000000000, 1553817600000000000, 675907200000000000, 1438300800000000000, 1451952000000000000, 409276800000000000, 851644800000000000, 763171200000000000, 1371427200000000000, 752112000000000000, 1448841600000000000, 564105600000000000, 995414400000000000, 829526400000000000, 1426723200000000000, 1520208000000000000, 1220918400000000000, 1064448000000000000, 567734400000000000, 1459296000000000000, 1486598400000000000, 962582400000000000, 1500249600000000000, 1343779200000000000, 1466726400000000000, 836352000000000000, 1101772800000000000, 1533081600000000000, 913766400000000000, 1367193600000000000, 725760000000000000, 1566259200000000000, 803174400000000000, 1212364800000000000, 1384732800000000000, 10108800000000000, 404956800000000000, 786153600000000000, 1020124800000000000, 677289600000000000, 754704000000000000, -1014768000000000000, 1285545600000000000, 1340841600000000000, 1075420800000000000, 975888000000000000, 876355200000000000, 522460800000000000, 1147392000000000000, 1583193600000000000, 889056000000000000, 1242950400000000000, 1072828800000000000, 1480377600000000000, 1049068800000000000, 838944000000000000, 1325548800000000000, 1292371200000000000, 584582400000000000, 971654400000000000, 750470400000000000, 1568851200000000000, 1127433600000000000, 1522281600000000000, 841795200000000000, 1406764800000000000, 896400000000000000, 1263945600000000000, 1144368000000000000, 558230400000000000, 823651200000000000, 1354492800000000000, 1398729600000000000, 1564617600000000000, 1288137600000000000, 735177600000000000, 1454025600000000000, 856828800000000000, 338774400000000000, 1427760000000000000, 563500800000000000, 958348800000000000, 1312243200000000000, 1509667200000000000, 885772800000000000, 1317081600000000000, 1217548800000000000, 1560384000000000000, 963187200000000000, 1206489600000000000, 786240000000000000, 1516147200000000000, 1372377600000000000, 675648000000000000, 842832000000000000, 1380499200000000000, 1067558400000000000, 1135814400000000000, 1163116800000000000, 1346889600000000000, 1360540800000000000, -622512000000000000, 958953600000000000, 1135900800000000000, -965347200000000000, 815184000000000000, 1467676800000000000, 1231372800000000000, 1061251200000000000, 1014249600000000000, 1191196800000000000, 1354233600000000000, 1565308800000000000, 1041292800000000000, 1578960000000000000, 1436140800000000000, 1164844800000000000, 810950400000000000, 1507680000000000000, 1275436800000000000, 1496620800000000000, 1231200000000000000, 954720000000000000, -626745600000000000, 501292800000000000, 1032134400000000000, 1463443200000000000, 1109548800000000000, 1334275200000000000, 1531699200000000000, -210470400000000000, 1218758400000000000, 878515200000000000, 1376611200000000000, 1103241600000000000, 749347200000000000, 994723200000000000, 817776000000000000, 1337558400000000000, 1072137600000000000, 452822400000000000, 1514505600000000000, 640828800000000000, 795657600000000000, 1414972800000000000, 1580860800000000000, 817603200000000000, 1001376000000000000, 1539043200000000000, 123465600000000000, 661132800000000000, 1198800000000000000, 1096934400000000000, 770342400000000000, 1491782400000000000, 647654400000000000, 1432857600000000000, 1499212800000000000, 1576627200000000000, 868838400000000000, 1222732800000000000, 1488153600000000000, 946252800000000000, 503884800000000000, 680832000000000000, 1178841600000000000, 1049673600000000000, 736732800000000000, 1369958400000000000, 1029715200000000000, 831427200000000000, 654480000000000000, 1450742400000000000, 1340150400000000000, 1251676800000000000, 875664000000000000, 1152144000000000000, 1417564800000000000, 1041552000000000000, 1141084800000000000, 1227139200000000000, 1057017600000000000, 1438214400000000000, 1479168000000000000, 785030400000000000, 1152576000000000000, 1506470400000000000, 1336348800000000000, 812332800000000000, 1363651200000000000, 1009756800000000000, 1023408000000000000, 1207180800000000000, 1561075200000000000, 1220832000000000000, 1015200000000000000, 473299200000000000, 1258502400000000000, 1523923200000000000, 1114732800000000000, 1335916800000000000, 1147910400000000000, 1103673600000000000, 727660800000000000, 561772800000000000, 1459209600000000000, 765072000000000000, 989798400000000000, 1003449600000000000, 874281600000000000, 717811200000000000, 1241136000000000000, 1099008000000000000, 1296432000000000000, 933552000000000000, 491184000000000000, 1099440000000000000, 1088380800000000000, 1110499200000000000, 988848000000000000, 1165795200000000000, 822960000000000000, 1486512000000000000, 1442275200000000000, 602294400000000000, 1507507200000000000, 656899200000000000, 1051747200000000000, 881625600000000000, 1065398400000000000, 1419292800000000000, 963532800000000000, 977184000000000000, 1283212800000000000, 1360627200000000000, 1172620800000000000, 1526515200000000000, 818726400000000000, 1338508800000000000, 630720000000000000, 984614400000000000, 796608000000000000, 1327449600000000000, 1004486400000000000, 1031788800000000000, 888969600000000000, 1100044800000000000, 1283817600000000000, 1481241600000000000, 1494892800000000000, 1338422400000000000, 1522195200000000000, 1365724800000000000, 841708800000000000, 1195603200000000000, 1549497600000000000, 1566518400000000000, 593308800000000000, 1024617600000000000, 1466985600000000000, 1201564800000000000, 1555459200000000000, 1179446400000000000, 1444867200000000000, 814492800000000000, 1168387200000000000, 726192000000000000, 372297600000000000, 1447632000000000000, 1291161600000000000, 1121040000000000000, 1134691200000000000, 1502236800000000000, 1175644800000000000, 1005523200000000000, 1556841600000000000, 1386720000000000000, -1434758400000000000, 1042502400000000000, 1020384000000000000, 1285804800000000000, 1462752000000000000, 1274745600000000000, 1363219200000000000, 1175212800000000000, 1330041600000000000, 1506988800000000000, 1271203200000000000, 577065600000000000, 1298505600000000000, 1509580800000000000, 1155686400000000000, 686275200000000000, 870048000000000000, 1580169600000000000, 783907200000000000, 1314748800000000000, 1126742400000000000, 1204156800000000000, 938736000000000000, 1016150400000000000, 651196800000000000, 1005091200000000000, 374716800000000000, 1503273600000000000, 1516924800000000000, 1190332800000000000, 1020211200000000000, -565488000000000000, 1387756800000000000, 1401408000000000000, 1415059200000000000, 1088467200000000000, -1191369600000000000, 993427200000000000, 1313452800000000000, 1143072000000000000, 632966400000000000, -428716800000000000, 1014163200000000000, 776044800000000000, 1306886400000000000, 687571200000000000, 1273017600000000000, 879206400000000000, 1222041600000000000, 1575936000000000000, 1476403200000000000, 1299456000000000000, 700963200000000000, 1238630400000000000, 374371200000000000, 796521600000000000, 886032000000000000, 1306281600000000000, 1217808000000000000, 1372636800000000000, 1450051200000000000, 100828800000000000, 620611200000000000, 1062979200000000000, 1494288000000000000, 698025600000000000, 497232000000000000, 1402444800000000000, 1586217600000000000, 1245974400000000000, 1075852800000000000, 1286928000000000000, 1130457600000000000, 1498003200000000000, 1001289600000000000, 948153600000000000, 1467936000000000000, 483667200000000000, 1257811200000000000, 1313107200000000000, 1490054400000000000, 981331200000000000, 693792000000000000, 1213574400000000000, 1191456000000000000, 1239667200000000000, 1096848000000000000, 1423440000000000000, 1294272000000000000, 967680000000000000, 1151452800000000000, 1335225600000000000, -549763200000000000, 1342051200000000000, 1209340800000000000, 1187222400000000000, 999216000000000000, 1253577600000000000, -184118400000000000, 1054512000000000000, 1220400000000000000, 755913600000000000, 567907200000000000, 56160000000000000, 1301616000000000000, 988675200000000000, 1254355200000000000, 730339200000000000, 1438128000000000000, 743990400000000000, 927763200000000000, 941414400000000000, 1481587200000000000, 1205107200000000000, 1536883200000000000, 994982400000000000, 1105574400000000000, 751680000000000000, 1404172800000000000, 66009600000000000, 1293580800000000000, 674265600000000000, 1322611200000000000, 1152489600000000000, 628473600000000000, 1377216000000000000, 1023321600000000000, 853200000000000000, 1146182400000000000, 1329955200000000000, 976060800000000000, 1145577600000000000, 1222992000000000000, 515203200000000000, 39657600000000000, 913334400000000000, 470966400000000000, 736387200000000000, 1433116800000000000, 1521590400000000000, 1245110400000000000, 690422400000000000, 1425513600000000000, 1098921600000000000, 574905600000000000, 1493769600000000000, 1323648000000000000, 997056000000000000, 1097107200000000000, 1517356800000000000, 1428883200000000000, 599443200000000000, 1051660800000000000, 1196640000000000000, 1008633600000000000, 964396800000000000, 1163462400000000000, 1174521600000000000, 1419206400000000000, 752371200000000000, 1119916800000000000, 779673600000000000, 1317340800000000000, 963446400000000000, 793324800000000000, 1528416000000000000, 875232000000000000, 1072656000000000000, 1347235200000000000, 1236643200000000000, 1446768000000000000, 1015459200000000000, 1325116800000000000, 1269820800000000000, 1114992000000000000, 1435708800000000000, 1059696000000000000, 960163200000000000, 957139200000000000, 1522108800000000000, 827971200000000000, 1222819200000000000, -716774400000000000, 1066348800000000000, 1277424000000000000, 1474848000000000000, 1464652800000000000, 1442534400000000000, 1508889600000000000, 1420416000000000000, -1156377600000000000, 1210291200000000000, 1542067200000000000, 845337600000000000, 491443200000000000, 1188172800000000000, 454118400000000000, 821664000000000000, 1202860800000000000, 1032739200000000000, 1046390400000000000, 1413936000000000000, 1243814400000000000, 903571200000000000, 1298419200000000000, 944524800000000000, 1509494400000000000, 1339372800000000000, 1548892800000000000, 1360886400000000000, 1084406400000000000, 1338768000000000000, 1040169600000000000, 852163200000000000, 1106524800000000000, 818985600000000000, 929577600000000000, 1460419200000000000, 1393977600000000000, 1223856000000000000, 1577750400000000000, 1462233600000000000, 951868800000000000, 1333065600000000000, -27907200000000000, 1456185600000000000, 1080172800000000000, 1411948800000000000, 1301356800000000000, 1467244800000000000, 1201824000000000000, 770515200000000000, 847929600000000000, 803692800000000000, 1423008000000000000, 890956800000000000, 877305600000000000, 904608000000000000, 931910400000000000, 775440000000000000, 789091200000000000, 1524182400000000000, 816393600000000000, 870998400000000000, 1308182400000000000, 910051200000000000, 1429833600000000000, 1075939200000000000, 1330300800000000000, 1573603200000000000, 1219708800000000000, 688867200000000000, 1120176000000000000, 733104000000000000, 1306800000000000000, 1517875200000000000, 653616000000000000, 1218585600000000000, 1572480000000000000, 1048464000000000000, 1586131200000000000, 1062115200000000000, 784166400000000000, 1016409600000000000, 1569369600000000000, 1215475200000000000, 1027468800000000000, 883699200000000000, 1525132800000000000, 728870400000000000, 363916800000000000, 938995200000000000, 946598400000000000, 1497916800000000000, 803779200000000000, 1171324800000000000, 477187200000000000, 1014854400000000000, 1593475200000000000, 899337600000000000, 1083110400000000000, -672710400000000000, 1137715200000000000, 1576195200000000000, 636163200000000000, 1498780800000000000, 1348790400000000000, 857347200000000000, 1034294400000000000, 945820800000000000, 1554076800000000000, 746755200000000000, 1443484800000000000, 1546214400000000000, 1219622400000000000, 695606400000000000, 1430697600000000000, 1444348800000000000, 1117756800000000000, 1131408000000000000, 791164800000000000, 1158710400000000000, 1342483200000000000, 1539907200000000000, 1369785600000000000, 1406073600000000000, -31622400000000000, 941587200000000000, 753580800000000000, 1007942400000000000, 985824000000000000, 1339718400000000000, 897350400000000000, 1328659200000000000, 1417132800000000000, 1410739200000000000, 1254268800000000000, 1084147200000000000, 1465344000000000000, 757555200000000000, 1492646400000000000, 968630400000000000, 1506297600000000000, 1519948800000000000, 1533600000000000000, 1179705600000000000, 769651200000000000, 315446400000000000, 853113600000000000, 1064188800000000000, 1335484800000000000, 793584000000000000, 1313366400000000000, 1401840000000000000, 1291248000000000000, 1169596800000000000, 1435017600000000000, 1059004800000000000, 705110400000000000, 1158537600000000000, 1077840000000000000, 764899200000000000, 948672000000000000, 792201600000000000, 438307200000000000, 975974400000000000, 1159747200000000000, 1513641600000000000, 1540944000000000000, 1044230400000000000, 717638400000000000, 744940800000000000, 1309132800000000000, 1585612800000000000, 667699200000000000, 1408665600000000000, 1154304000000000000, 700876800000000000, -84326400000000000, 767232000000000000, 1209600000000000000, 1121126400000000000, 1309910400000000000, 799545600000000000, 983318400000000000, 1589241600000000000, 1248998400000000000, 895104000000000000, 908755200000000000, 922406400000000000, 936057600000000000, 1133481600000000000, 995241600000000000, 729820800000000000, 895708800000000000, 884649600000000000, 1238544000000000000, 807235200000000000, 652406400000000000, 1039478400000000000, 1304899200000000000, 1382313600000000000, 990662400000000000, 1569283200000000000, 691372800000000000, 1297296000000000000, 970704000000000000, 1365552000000000000, 780883200000000000, 681350400000000000, 1389139200000000000, 924652800000000000, 1355961600000000000, 913593600000000000, 537580800000000000, 1245369600000000000, 1112659200000000000, 1156896000000000000, 1209081600000000000, 882489600000000000, 1420156800000000000, 1066262400000000000, 1461110400000000000, 753321600000000000, 1290988800000000000, 1304640000000000000, 1318291200000000000, 978048000000000000, 1175472000000000000, 1529366400000000000, 1556668800000000000, 848880000000000000, 1202774400000000000, 1400198400000000000, 699235200000000000, 1572912000000000000, 1031011200000000000, 920419200000000000, 1473379200000000000, 1086307200000000000, 831945600000000000, 1008892800000000000, 643939200000000000, 1185840000000000000, 1271030400000000000, 1495756800000000000, 1141862400000000000, 1210118400000000000, 1393891200000000000, 883526400000000000, 713404800000000000, 1094601600000000000, 1314316800000000000, 838771200000000000, 1535500800000000000, 871948800000000000, 1214784000000000000, 1413849600000000000, 1192665600000000000, 949363200000000000, 1104192000000000000, 1491264000000000000, 768009600000000000, 1462147200000000000, 938131200000000000, 1571356800000000000, 1442188800000000000, 748051200000000000, 1129248000000000000, 1542326400000000000, 1232668800000000000, 790300800000000000, 1210550400000000000, 768182400000000000, 746064000000000000, 1453852800000000000, 1177372800000000000, 757123200000000000, 524880000000000000, 1170201600000000000, 870912000000000000, 1109289600000000000, 939168000000000000, 782697600000000000, 796348800000000000, 1504137600000000000, 1334016000000000000, 993772800000000000, 1538092800000000000, 1460678400000000000, 896659200000000000, 974073600000000000, 1560211200000000000, 1383264000000000000, 719712000000000000, 443232000000000000, 631238400000000000, 1327968000000000000, 1361318400000000000, 1218499200000000000, 878256000000000000, 1062028800000000000, 1075680000000000000, 1456876800000000000, 1286755200000000000, 1130284800000000000, 1171238400000000000, 1184889600000000000, 1368662400000000000, 1042070400000000000, 1555977600000000000, 969840000000000000, 759715200000000000, 1445385600000000000, 903484800000000000, 518054400000000000, 593827200000000000, 1025136000000000000, 1456444800000000000, 1014076800000000000, 1593388800000000000, 1436918400000000000, 1280448000000000000, 1477872000000000000, 1151280000000000000, 1505174400000000000, 640915200000000000, 1532476800000000000, 851990400000000000, 1587081600000000000, 525398400000000000, 709171200000000000, 1246838400000000000, 1219968000000000000, 1197849600000000000, 1242086400000000000, 965606400000000000, 899251200000000000, 1562803200000000000, 1474329600000000000, 655948800000000000, 1363737600000000000, 1430092800000000000, 1444262400000000000, 920246400000000000, 763776000000000000, 593654400000000000, 804729600000000000, 1185926400000000000, 1369699200000000000, 1043107200000000000, 1240531200000000000, 716515200000000000, 552182400000000000, 928195200000000000, 883958400000000000, 1138665600000000000, 441590400000000000, 773366400000000000, 751248000000000000, -686448000000000000, 1193616000000000000, 1005609600000000000, 1519862400000000000, 839376000000000000, 880329600000000000, 1417996800000000000, 893980800000000000, 723859200000000000, 907632000000000000, 1091404800000000000, 1472601600000000000, 70675200000000000, 778464000000000000, 962236800000000000, 1499904000000000000, 1513555200000000000, 1233619200000000000, 1587513600000000000, 1399507200000000000, 1543276800000000000, 1111968000000000000, 1357084800000000000, 1167264000000000000, 581126400000000000, 1465862400000000000, 1366329600000000000, 1540857600000000000, 1186963200000000000, 1214265600000000000, 1071446400000000000, 1425340800000000000, -670723200000000000, 1452643200000000000, 1282521600000000000, 758505600000000000, 1126051200000000000, 1493596800000000000, 969580800000000000, 1180656000000000000, 826761600000000000, 1364428800000000000, 840412800000000000, 1229385600000000000, 798076800000000000, 1351036800000000000, 621129600000000000, 952905600000000000, 1472688000000000000, 930787200000000000, 867715200000000000, 886550400000000000, 875491200000000000, 527472000000000000, 1065139200000000000, 1432684800000000000, 922320000000000000, 752198400000000000, 1459987200000000000, 1473638400000000000, 241833600000000000, 1147046400000000000, 1174348800000000000, 847756800000000000, 1031529600000000000, 507513600000000000, 871257600000000000, 1037145600000000000, 1147737600000000000, 639014400000000000, 1346803200000000000, 1158796800000000000, 1468454400000000000, 760665600000000000, 1335744000000000000, 959731200000000000, 1222646400000000000, 528508800000000000, 1249948800000000000, 889142400000000000, 1574812800000000000, 1386806400000000000, 1099267200000000000, 789609600000000000, 1143504000000000000, 601603200000000000, 596764800000000000, 1488326400000000000, 1486339200000000000, 1304553600000000000, 1515628800000000000, 991612800000000000, 1529280000000000000, 1189036800000000000, 1556582400000000000, 862444800000000000, 1413763200000000000, 1427414400000000000, 1441065600000000000, 1087171200000000000, 930700800000000000, 1468368000000000000, 760579200000000000, 236563200000000000, 1311897600000000000, 1495670400000000000, 787881600000000000, 1509321600000000000, 1382572800000000000, 1194566400000000000, 1139270400000000000, 1448928000000000000, 984441600000000000, 962323200000000000, 1482105600000000000, 730080000000000000, 1327276800000000000, 1504224000000000000, 1182729600000000000, -1280880000000000000, 1196380800000000000, 1393804800000000000, 883440000000000000, 1067212800000000000, 1264636800000000000, 938044800000000000, 1291939200000000000, 638755200000000000, 822528000000000000, 836179200000000000, 1373846400000000000, 1090800000000000000, 1068681600000000000, 880675200000000000, -1076803200000000000, 1212451200000000000, 1024444800000000000, 670550400000000000, 1300924800000000000, 947030400000000000, 1112918400000000000, 1387497600000000000, 679708800000000000, 863481600000000000, 1401148800000000000, 536889600000000000, 1074556800000000000, 720662400000000000, 1258329600000000000, 564192000000000000, 210297600000000000, 747964800000000000, 1455753600000000000, 1285632000000000000, 1483056000000000000, 1312934400000000000, 1551312000000000000, 843523200000000000, 1027555200000000000, 1197936000000000000, 1551830400000000000, 898646400000000000, 925948800000000000, 1130198400000000000, 1572566400000000000, 830908800000000000, 1035158400000000000, 858211200000000000, 1363046400000000000, 1130803200000000000, 1484697600000000000, 1396224000000000000, 1208217600000000000, 911779200000000000, 925430400000000000, 1504051200000000000, 1347580800000000000, 1558656000000000000, 694396800000000000, 565228800000000000, 1524700800000000000, 1082332800000000000, 894326400000000000, 1314576000000000000, 1480464000000000000, 1292457600000000000, 1325635200000000000, 783734400000000000, 1491523200000000000, 429840000000000000, 1157500800000000000, 899164800000000000, 756345600000000000, 783648000000000000, 934329600000000000, 1542585600000000000, 978566400000000000, 536198400000000000, 1509408000000000000, 425606400000000000, 1022803200000000000, 270777600000000000, 16416000000000000, 1398816000000000000, 1505088000000000000, 1559692800000000000, 1586995200000000000, 1416873600000000000, 1444176000000000000, 1172188800000000000, 1539734400000000000, 1206576000000000000, 1538352000000000000, 1162339200000000000, 1328227200000000000, 786326400000000000, 1306108800000000000, 863740800000000000, 1173398400000000000, 963273600000000000, 1317168000000000000, 845596800000000000, 1580688000000000000, 1070323200000000000, 1254096000000000000, 913852800000000000, 559958400000000000, 1451520000000000000, 927504000000000000, 1465171200000000000, 941155200000000000, 798336000000000000, 1152230400000000000, 1165881600000000000, 1519776000000000000, 1023062400000000000, 682819200000000000, 1534118400000000000, 1069632000000000000, 1323993600000000000, 1379289600000000000, 837388800000000000, 1545177600000000000, 649382400000000000, 815270400000000000, 461376000000000000, 1169164800000000000, 893894400000000000, 1431561600000000000, 723772800000000000, 1104969600000000000, 778377600000000000, 1499817600000000000, 465436800000000000, 846633600000000000, -739065600000000000, 1227830400000000000, 1411603200000000000, 1438905600000000000, 678326400000000000, 1010102400000000000, 987984000000000000, 1507766400000000000, 1164931200000000000, 1496707200000000000, 954806400000000000, 844214400000000000, 1109635200000000000, 1032220800000000000, 969494400000000000, 996796800000000000, 1010448000000000000, 1418947200000000000, 1133308800000000000, 961632000000000000, 1381881600000000000, 1293408000000000000, 1547769600000000000, 751507200000000000, 1083283200000000000, 1536710400000000000, 1348704000000000000, 1160697600000000000, 1492473600000000000, 1160611200000000000, 1528156800000000000, 1174262400000000000, 1398988800000000000, 1086048000000000000, 1297123200000000000, 997833600000000000, 791510400000000000, 1189641600000000000, 1001635200000000000, 913161600000000000, 1410825600000000000, 1056931200000000000, 846806400000000000, 1178582400000000000, -236995200000000000, 1499299200000000000, 827712000000000000, 1379030400000000000, 841363200000000000, 1576454400000000000, 1419984000000000000, 923270400000000000, 1460937600000000000, 766800000000000000, 1120694400000000000, 1304467200000000000, 1488240000000000000, 1147996800000000000, 977875200000000000, 1372723200000000000, -1104537600000000000, 1032480000000000000, 1229644800000000000, 1141171200000000000, 1063756800000000000, 709862400000000000, 1561420800000000000, 1284940800000000000, 831513600000000000, 1539302400000000000, 1450828800000000000, 720921600000000000, 1229904000000000000, 1243555200000000000, 889660800000000000, 1257206400000000000, 1440979200000000000, 746841600000000000, 774144000000000000, 1311811200000000000, 1563840000000000000, 189216000000000000, 1512950400000000000, 705628800000000000, 760924800000000000, 1369180800000000000, 1336003200000000000, 1015286400000000000, 1435536000000000000, 1402358400000000000, 871516800000000000, 1568246400000000000, 1448323200000000000, 1305504000000000000, 978912000000000000, 1530230400000000000, -947030400000000000, 1203638400000000000, 1387411200000000000, 1571184000000000000, 1414713600000000000, 550454400000000000, 747878400000000000, 889401600000000000, 1409184000000000000, 1055289600000000000, 778809600000000000, 1199059200000000000, -1278201600000000000, 1011052800000000000, 1176940800000000000, 823046400000000000, 1442361600000000000, 1482969600000000000, 1156377600000000000, 972604800000000000, 1394755200000000000, 1040860800000000000, 1279238400000000000, 1292889600000000000, 1476662400000000000, 966297600000000000, 1150070400000000000, 818812800000000000, 630806400000000000, 774576000000000000, 675043200000000000, 1194825600000000000, 1006819200000000000, 1161648000000000000, 1515542400000000000, 1172707200000000000, 1374796800000000000, 837129600000000000, 1204675200000000000, 496886400000000000, 1231977600000000000, 13824000000000000, 551491200000000000, 1456704000000000000, 1470355200000000000, 1484006400000000000, 1143763200000000000, 1341187200000000000, 830822400000000000, 1552262400000000000, 748224000000000000, 1091059200000000000, 1478131200000000000, 1544486400000000000, 726105600000000000, 1577664000000000000, 825638400000000000, 1422835200000000000, 1268006400000000000, 1323302400000000000, 1252972800000000000, 1096502400000000000, 1123804800000000000, -291772800000000000, 1518652800000000000, 1219363200000000000, 879120000000000000, 1440720000000000000, 1518134400000000000, 567043200000000000, 976233600000000000, 1473897600000000000, 1285891200000000000, 1075766400000000000, 887760000000000000, 1363305600000000000, 1009411200000000000, 933724800000000000, 1301270400000000000, 1355875200000000000, 1539648000000000000, 872812800000000000, 532569600000000000, 886464000000000000, 1070236800000000000, 1451433600000000000, 219628800000000000, 1270598400000000000, 894585600000000000, 1458604800000000000, 76204800000000000, 761875200000000000, 1259539200000000000, 1071532800000000000, 1425427200000000000, 1359072000000000000, 1104710400000000000, -630979200000000000, 1506038400000000000, 761356800000000000, 1050278400000000000, 710035200000000000, 1431475200000000000, 1261353600000000000, 1275004800000000000, 1288656000000000000, -297043200000000000, 778291200000000000, 1145836800000000000, 1177891200000000000, 1078358400000000000, 989884800000000000, 1155772800000000000, 868233600000000000, 945648000000000000, 1111536000000000000, 757641600000000000, 735523200000000000, 989366400000000000, 1343260800000000000, 1567987200000000000, 1043971200000000000, 1581638400000000000, 703728000000000000, 717379200000000000, 731030400000000000, 914803200000000000, 942105600000000000, 1296000000000000000, 1479772800000000000, 799286400000000000, -64972800000000000, 1350604800000000000, 1450137600000000000, 764467200000000000, 1074124800000000000, 886118400000000000, 532224000000000000, 1505433600000000000, 1295308800000000000, 919296000000000000, 1582848000000000000, 875059200000000000, 1561680000000000000, 1221436800000000000, 1575331200000000000, 1064966400000000000, 554601600000000000, 1446163200000000000, 1092268800000000000, 568252800000000000, 1276041600000000000, 792979200000000000, 1514419200000000000, 1344297600000000000, 1528070400000000000, 1017705600000000000, 1555372800000000000, 1201478400000000000, 1045008000000000000, 1398902400000000000, 1582675200000000000, 1136246400000000000, 1169424000000000000, 417398400000000000, 1191542400000000000, 826588800000000000, 915062400000000000, 760233600000000000, 859766400000000000, 1014595200000000000, 1291075200000000000, 1439856000000000000, -302313600000000000, 1467158400000000000, 773020800000000000, 970444800000000000, 1324339200000000000, 813974400000000000, 1562716800000000000, 882230400000000000, 1066003200000000000, 1419897600000000000, 909532800000000000, 1263427200000000000, 1277078400000000000, 1375315200000000000, 1187308800000000000, 1132012800000000000, 1109894400000000000, 545875200000000000, 1165190400000000000, 623289600000000000, -438393600000000000, 932947200000000000, 1264723200000000000, 950486400000000000, 1501804800000000000, 1331683200000000000, 1188864000000000000, 1243468800000000000, 1257120000000000000, 930528000000000000, 1284422400000000000, 1468195200000000000, 1282608000000000000, 1592265600000000000, 1183075200000000000, 1083542400000000000, 972950400000000000, 928713600000000000, 1260489600000000000, 1315785600000000000, 1127779200000000000, 851299200000000000, 1168905600000000000, -1322006400000000000, 1012435200000000000, 1550102400000000000, 1196208000000000000, 488419200000000000, 1577404800000000000, 1223510400000000000, 1053388800000000000, 175478400000000000, 1237161600000000000, 1080691200000000000, 924220800000000000, 1475539200000000000, 1319068800000000000, 780710400000000000, 1433203200000000000, 847065600000000000, 625881600000000000, -922406400000000000, 736473600000000000, 968716800000000000, 1167782400000000000, 1095897600000000000, 1200960000000000000, 1033430400000000000, 1387324800000000000, 1230854400000000000, 1428278400000000000, 1441929600000000000, 1482883200000000000, 972518400000000000, 1326412800000000000, 1523836800000000000, 475804800000000000, 1367366400000000000, 1210896000000000000, 533174400000000000, 1406851200000000000, 1307318400000000000, 975542400000000000, 1506384000000000000, 1318377600000000000, 1440028800000000000, 1052956800000000000, 964483200000000000, 1435622400000000000, 1081728000000000000, 1421971200000000000, 1462924800000000000, 1109030400000000000, 993513600000000000, 1347408000000000000, 850694400000000000, 1388361600000000000, 326678400000000000, 1402012800000000000, 1415664000000000000, 905299200000000000, 1070841600000000000, 1236729600000000000, 805420800000000000, 1269907200000000000, 705888000000000000, 1225670400000000000, 1579564800000000000, 1513209600000000000, 1502150400000000000, 1303084800000000000, 762480000000000000, 959904000000000000, 1511222400000000000, 1354752000000000000, 830736000000000000, 1028160000000000000, 858038400000000000, 715219200000000000, 912643200000000000, 1450310400000000000, 1280188800000000000, 1477612800000000000, 1508976000000000000, 1320969600000000000, 989193600000000000, 1298851200000000000, 1464739200000000000, 922838400000000000, 834364800000000000, 1542153600000000000, 1166140800000000000, 1144022400000000000, 1151020800000000000, 1348444800000000000, -53481600000000000, 1362096000000000000, 1545868800000000000, 838080000000000000, 1021852800000000000, 1559520000000000000, 865382400000000000, 1573171200000000000, 1049155200000000000, 1586822400000000000, 892684800000000000, 1430352000000000000, 1076457600000000000, 1260230400000000000, 906336000000000000, 1444003200000000000, 919987200000000000, 1131062400000000000, 1314835200000000000, 1498608000000000000, 1328486400000000000, 804470400000000000, 1342137600000000000, -353203200000000000, 1372032000000000000, 885427200000000000, 1007078400000000000, 520473600000000000, 1084492800000000000, 962841600000000000, 951782400000000000, 387763200000000000, 1471564800000000000, 872726400000000000, 702604800000000000, 1083801600000000000, 1294876800000000000, 784512000000000000, 1152057600000000000, 1179360000000000000, 825465600000000000, 1206662400000000000, 1412035200000000000, 1036022400000000000, 1146614400000000000, 1544745600000000000, 1312502400000000000, 1467331200000000000, 715305600000000000, 825897600000000000, 1268265600000000000, 1247616000000000000, 893721600000000000, 1077494400000000000, 737251200000000000, 1091145600000000000, 567129600000000000, 1458691200000000000, 1288569600000000000, 961977600000000000, 1315872000000000000, 975628800000000000, 1513296000000000000, 805507200000000000, 1526947200000000000, 519868800000000000, 1411430400000000000, 1098144000000000000, 910137600000000000, 1330387200000000000, 976492800000000000, 954374400000000000, 600480000000000000, 730944000000000000, 766368000000000000, -29894400000000000, 1529452800000000000, 744595200000000000, 758246400000000000, 574473600000000000, 942019200000000000, 1112140800000000000, 1479686400000000000, 955670400000000000, 1166745600000000000, 1350518400000000000, 826502400000000000, 1364169600000000000, 1377820800000000000, 1561593600000000000, 1037577600000000000, 1575244800000000000, -364348800000000000, 1235001600000000000, 1064880000000000000, 1418774400000000000, 724636800000000000, 922060800000000000, 1119484800000000000, -365904000000000000, 1304035200000000000, 1569456000000000000, 839548800000000000, 1359331200000000000, 1480982400000000000, 1204502400000000000, 1292976000000000000, 1436745600000000000, 1330560000000000000, 1133136000000000000, 1514332800000000000, 1160438400000000000, 820195200000000000, 1003968000000000000, 1371513600000000000, 1017619200000000000, 1568937600000000000, 1582588800000000000, 704678400000000000, 1242345600000000000, 534556800000000000, 1283299200000000000, 929404800000000000, 1324252800000000000, 630115200000000000, 1443571200000000000, 5875200000000000, 1554163200000000000, 1509926400000000000, 1332979200000000000, 1476748800000000000, 934848000000000000, 1122854400000000000, 503539200000000000, 404006400000000000, 657417600000000000, 1024963200000000000, 997660800000000000, 1195084800000000000, 698371200000000000, 1589932800000000000, 882144000000000000, 1433462400000000000, 725673600000000000, 1474416000000000000, 1304294400000000000, 964051200000000000, 1175126400000000000, 941673600000000000, 1273449600000000000, 1583107200000000000, 1527811200000000000, 678412800000000000, 985910400000000000, 1216080000000000000, -19612800000000000, 1284508800000000000, 1439337600000000000, 1059609600000000000, 1243382400000000000, 1284336000000000000, 760320000000000000, 420076800000000000, 1481760000000000000, 1311638400000000000, 1495411200000000000, 1338940800000000000, 1522713600000000000, 842227200000000000, 1294963200000000000, 1379894400000000000, 1393545600000000000, 1223424000000000000, 1053302400000000000, 1590969600000000000, 1066953600000000000, 1479340800000000000, 749433600000000000, 1169683200000000000, 1036972800000000000, 1556755200000000000, 472953600000000000, 970617600000000000, 1280275200000000000, 1236038400000000000, 924134400000000000, 1080604800000000000, 597542400000000000, 1489104000000000000, 965088000000000000, 1320019200000000000, 1502755200000000000, -82944000000000000, 624844800000000000, 835920000000000000, 1373587200000000000, 495676800000000000, 1203465600000000000, 1033344000000000000, 509328000000000000, 693100800000000000, 876873600000000000, -157507200000000000, 917827200000000000, 931478400000000000, 1287100800000000000, 1264982400000000000, 1076976000000000000, 667785600000000000, 1353456000000000000, 645667200000000000, 1519344000000000000, 800496000000000000, 1154390400000000000, 788659200000000000, 1299024000000000000, 972432000000000000, 802310400000000000, 1510099200000000000, 1156204800000000000, 462067200000000000, 1367280000000000000, 1013385600000000000, -34646400000000000, 1210809600000000000, 360201600000000000, 1251763200000000000, 897868800000000000, 911520000000000000, 741398400000000000, 1449187200000000000, 1122595200000000000, 1306368000000000000] FI_OldestShareInceptionDate - difference of value mapping : [1415750400000000000, 1325030400000000000, 721008000000000000, 1510704000000000000, 1481846400000000000, 1530057600000000000, 1548979200000000000, 1258329600000000000, 1088467200000000000, 1064188800000000000, 1178841600000000000, 1128038400000000000, 641433600000000000, 995328000000000000, 1492992000000000000, 1470873600000000000, 1313712000000000000, 1123804800000000000, 1544054400000000000, 1112745600000000000, 615081600000000000, 1499817600000000000, 1311811200000000000, 1046390400000000000, 404956800000000000, 847324800000000000, 913680000000000000, 1592265600000000000, 1296518400000000000, 1451347200000000000, 1108512000000000000, 1506643200000000000, 865209600000000000, 644025600000000000, -428716800000000000, 632966400000000000, 219542400000000000, 783561600000000000, 1424995200000000000, 717206400000000000, 1491350400000000000, 1413936000000000000, 838857600000000000, 1369699200000000000, 1181692800000000000, 374371200000000000, 1560470400000000000, 1206576000000000000, 779328000000000000, 1398643200000000000, 1442880000000000000, 646617600000000000, 1055808000000000000, 1564531200000000000, 547084800000000000, 1376524800000000000, 1365465600000000000, 1531353600000000000, 1513209600000000000, 443318400000000000, 1294876800000000000, 929923200000000000, 1283817600000000000, -1215561600000000000, 465436800000000000, 542851200000000000, 1394409600000000000, 1560297600000000000, 1516060800000000000, 1391385600000000000, 370656000000000000, 903571200000000000, 870393600000000000, 439084800000000000, 1434412800000000000, 383788800000000000, 1080518400000000000, 969926400000000000, 792979200000000000, 1213228800000000000, 1589241600000000000, 788745600000000000, 1430179200000000000, 844041600000000000, 998870400000000000, 512265600000000000, 1474416000000000000, 1518652800000000000, 1197936000000000000, 1551830400000000000, 1317859200000000000, 1147737600000000000, 991267200000000000, 1459123200000000000, 1204761600000000000, -476236800000000000, 740275200000000000, 762393600000000000, 1536537600000000000, 386380800000000000, 574387200000000000, 1237939200000000000, 1326412800000000000, 835574400000000000, 1167350400000000000, 1277942400000000000, 1067817600000000000, 1532304000000000000, 1222646400000000000, 1034640000000000000, 849484800000000000, 499564800000000000, 1373241600000000000, 1461715200000000000, 930873600000000000, 1528070400000000000, 1152057600000000000, 919814400000000000, 377913600000000000, -739065600000000000, 1450656000000000000, 1251676800000000000, 1391126400000000000, 1380067200000000000, 1004054400000000000, 716515200000000000, 1346889600000000000, 1545955200000000000, 1335830400000000000, 417916800000000000, 749692800000000000, 1446422400000000000, 1340928000000000000, 1450137600000000000, 1342656000000000000, 1298419200000000000, 435801600000000000, 1563840000000000000, 1254182400000000000, 1464307200000000000, 1364774400000000000, 1309478400000000000, 402624000000000000, 1442188800000000000, 1307318400000000000, 851558400000000000, -114566400000000000, 1559606400000000000, 1128297600000000000, 951350400000000000, 685929600000000000, 1415836800000000000, 1249948800000000000, 741225600000000000, 1404777600000000000, 1360540800000000000, 586396800000000000, 1212537600000000000, 504748800000000000, 781228800000000000, 1489017600000000000, 1477958400000000000, 1146182400000000000, 1555372800000000000, 969235200000000000, 1179360000000000000, 1135123200000000000, 1064534400000000000, 1329955200000000000, 522633600000000000, 909705600000000000, 754876800000000000, 1197244800000000000, 976060800000000000, 1506902400000000000, 1551139200000000000, 1175126400000000000, 601603200000000000, 1534118400000000000, 1193875200000000000, 1207526400000000000, 1262131200000000000, 1480550400000000000, 938649600000000000, 1513728000000000000, 1170892800000000000, 960768000000000000, 425174400000000000, 1003795200000000000, 24019200000000000, 1365724800000000000, 967593600000000000, -647049600000000000, 646876800000000000, 724291200000000000, 1465257600000000000, 536284800000000000, 779587200000000000, 735350400000000000, 1195603200000000000, 1273017600000000000, 1438905600000000000, 1228780800000000000, 1151366400000000000, 841708800000000000, 1339372800000000000, 1162425600000000000, 1129248000000000000, 1569801600000000000, 875664000000000000, 1229558400000000000, 1454284800000000000, 1434672000000000000, 1346198400000000000, 970185600000000000, 914889600000000000, 1578441600000000000, 1456790400000000000, 1488931200000000000, 1230595200000000000, 720230400000000000, 556761600000000000, 1430438400000000000, 1386201600000000000, 678412800000000000, 1032307200000000000, 656294400000000000, 1153958400000000000, 1298851200000000000, 1326153600000000000, 972259200000000000, 645667200000000000, 1537228800000000000, 47088000000000000, 1348790400000000000, 1227139200000000000, 1061251200000000000, 652060800000000000, 596764800000000000, 1293494400000000000, 1415145600000000000, 497232000000000000, 1536796800000000000, 1459382400000000000, 1360800000000000000, 1075161600000000000, 1429056000000000000, 1057017600000000000, 791596800000000000, 957484800000000000, 824774400000000000, 1421971200000000000, 1521504000000000000, 1477267200000000000, 559353600000000000, 844128000000000000, 1266278400000000000, 1007942400000000000, 1559260800000000000, 1528329600000000000, 212284800000000000, 1329264000000000000, 1296086400000000000, 1439856000000000000, 820540800000000000, 1218672000000000000, 1572566400000000000, 1300924800000000000, 1490918400000000000, 738892800000000000, 1170201600000000000, 1004313600000000000, 871603200000000000, 1203379200000000000, 1446681600000000000, 1402444800000000000, 860544000000000000, 1546214400000000000, 1179100800000000000, 907113600000000000, 1586217600000000000, 867369600000000000, 1210204800000000000, 1387152000000000000, 933724800000000000, 1442448000000000000, 1088553600000000000, 1000080000000000000, 1177027200000000000, 1055376000000000000, 1493078400000000000, 812592000000000000, 1051142400000000000, 1194912000000000000, 1006905600000000000, 1438214400000000000, 1593043200000000000, 885254400000000000, 1172793600000000000, 1393977600000000000, 1548806400000000000, 1537747200000000000, 1561334400000000000, 1330300800000000000, 636163200000000000, 1527724800000000000, 1003708800000000000, 1577750400000000000, -302313600000000000, 914198400000000000, 1544572800000000000, 969494400000000000, 1223856000000000000, 1356566400000000000, 1201737600000000000, 1500336000000000000, 1146441600000000000, 901843200000000000, 1112918400000000000, 1507766400000000000, 1194825600000000000, 854582400000000000, 684460800000000000, -1135987200000000000, 1120089600000000000, 921024000000000000, 1540339200000000000, 545011200000000000, 1230681600000000000, 1219622400000000000, 854668800000000000, 1551398400000000000, 1462924800000000000, 1304035200000000000, 977443200000000000, 1188518400000000000, 848275200000000000, 861926400000000000, 875577600000000000, 1229472000000000000, 902880000000000000, 773020800000000000, 1569283200000000000, 839376000000000000, 905731200000000000, 618192000000000000, 695606400000000000, 850435200000000000, 750902400000000000, 1149033600000000000, 1447632000000000000, 1508803200000000000, -587260800000000000, 1536105600000000000, 1209513600000000000, 399859200000000000, 583632000000000000, 1475193600000000000, 1305072000000000000, 1134950400000000000, 691372800000000000, 901497600000000000, 1144800000000000000, 879379200000000000, 1189036800000000000, 468115200000000000, 1177977600000000000, 1005782400000000000, 945734400000000000, 1288569600000000000, 509068800000000000, 536371200000000000, 1257811200000000000, 747446400000000000, 39657600000000000, 985824000000000000, 1262217600000000000, 1284336000000000000, 1450224000000000000, 377481600000000000, 1339632000000000000, 875145600000000000, 1483401600000000000, 764553600000000000, 985737600000000000, 1206921600000000000, 870307200000000000, 883958400000000000, 1224201600000000000, 1448928000000000000, 1176940800000000000, 823046400000000000, 1075075200000000000, 1190851200000000000, 1544745600000000000, 421891200000000000, 714614400000000000, 1156982400000000000, 564969600000000000, 796521600000000000, 1443139200000000000, 869443200000000000, 1180569600000000000, 1534464000000000000, 1147392000000000000, 1324339200000000000, 1479168000000000000, 1313452800000000000, -1252022400000000000, 1552348800000000000, 1286928000000000000, 1098921600000000000, 1441756800000000000, 1530230400000000000, 1353283200000000000, 1519171200000000000, 1165276800000000000, 446428800000000000, 888796800000000000, 1205280000000000000, 1293753600000000000, -1183507200000000000, 574905600000000000, 1006214400000000000, 818208000000000000, 973036800000000000, 1315872000000000000, 420076800000000000, 1481760000000000000, 1328140800000000000, 1433289600000000000, 1554940800000000000, 1189987200000000000, 747619200000000000, 1543881600000000000, 1444348800000000000, 725500800000000000, 1344816000000000000, 891388800000000000, 1134691200000000000, 1471996800000000000, 1383782400000000000, 1130457600000000000, 411609600000000000, 1285286400000000000, 1196812800000000000, 1185753600000000000, 1539648000000000000, -52876800000000000, 997747200000000000, 1351641600000000000, 721267200000000000, 1491177600000000000, 1225756800000000000, 1303171200000000000, 1115164800000000000, 761270400000000000, 1181520000000000000, 1004572800000000000, 1269993600000000000, 1347408000000000000, 717033600000000000, 602467200000000000, 1498003200000000000, 1575417600000000000, 867628800000000000, 1110931200000000000, 1354233600000000000, 812332800000000000, 1420588800000000000, 712800000000000000, 1493769600000000000, 951868800000000000, 1294704000000000000, 1372118400000000000, 1460592000000000000, 1272585600000000000, 1538006400000000000, 730684800000000000, 376790400000000000, 1427414400000000000, 930096000000000000, 1141171200000000000, 1246233600000000000, 1412121600000000000, 1323648000000000000, 704332800000000000, 604800000000000000, 1301529600000000000, 1190937600000000000, 1456358400000000000, 1102464000000000000, 1522713600000000000, 1518480000000000000, 1330473600000000000, 722217600000000000, 954460800000000000, 865987200000000000, 1131408000000000000, 1474243200000000000, 1109289600000000000, 1009756800000000000, 1441065600000000000, 640569600000000000, 1436832000000000000, 618451200000000000, 1414713600000000000, 872812800000000000, 1215648000000000000, 1558483200000000000, 673747200000000000, 1005523200000000000, 1167177600000000000, 1510012800000000000, 824342400000000000, 791164800000000000, 769046400000000000, 1122940800000000000, 326678400000000000, 1465776000000000000, 923875200000000000, 1436227200000000000, 599270400000000000, 1362009600000000000, 742694400000000000, 1096588800000000000, 820108800000000000, 1439424000000000000, 1516838400000000000, 1151884800000000000, 532569600000000000, 1505779200000000000, 1041292800000000000, 1443571200000000000, 1539129600000000000, 760579200000000000, 1457308800000000000, 1191888000000000000, 1014940800000000000, 837993600000000000, 992822400000000000, 373507200000000000, 450921600000000000, 1158710400000000000, 528336000000000000, 770428800000000000, 933292800000000000, 391392000000000000, 1541548800000000000, 1530489600000000000, 723168000000000000, 988588800000000000, 811641600000000000, 1165536000000000000, 889056000000000000, 1143417600000000000, 1553817600000000000, 851644800000000000, 1371427200000000000, 752112000000000000, 564105600000000000, 1448841600000000000, 1426723200000000000, 1072828800000000000, 796348800000000000, 1415664000000000000, 1504137600000000000, 1064448000000000000, 894326400000000000, 751507200000000000, 1566259200000000000, 836352000000000000, 1367193600000000000, 747878400000000000, 1101772800000000000, 913766400000000000, 1488844800000000000, 725760000000000000, 1334016000000000000, 1411430400000000000, 786153600000000000, 677289600000000000, 1020124800000000000, 754704000000000000, -1014768000000000000, 1539907200000000000, 909532800000000000, 1340841600000000000, 787881600000000000, 975888000000000000, 384998400000000000, 783648000000000000, 1480377600000000000, 584582400000000000, 219628800000000000, 1369785600000000000, 750470400000000000, 1568851200000000000, 993772800000000000, 1436140800000000000, 905299200000000000, 1141084800000000000, 753580800000000000, 1398729600000000000, 558230400000000000, 1133308800000000000, -38966400000000000, 1354492800000000000, 735177600000000000, 1454025600000000000, 856828800000000000, 834710400000000000, 1288137600000000000, 338774400000000000, 1217548800000000000, 1206489600000000000, 1560384000000000000, 1482969600000000000, 730944000000000000, 1095897600000000000, 675648000000000000, 1361318400000000000, 1051660800000000000, 808358400000000000, 1380499200000000000, 1067558400000000000, 1163116800000000000, 1158019200000000000, -965347200000000000, 1423440000000000000, 1323907200000000000, -622512000000000000, 1135900800000000000, 958953600000000000, 1191196800000000000, 815184000000000000, 1080604800000000000, 1578960000000000000, 1225065600000000000, 1164844800000000000, 810950400000000000, 1507680000000000000, 1054252800000000000, -626745600000000000, 954720000000000000, 501292800000000000, 877305600000000000, 1540857600000000000, 1596153600000000000, 1463443200000000000, 1109548800000000000, 1218758400000000000, 749347200000000000, 817776000000000000, 640828800000000000, 718243200000000000, 1072137600000000000, 452822400000000000, 1160611200000000000, 795657600000000000, 1414972800000000000, 1580860800000000000, 1315440000000000000, 1539043200000000000, 123465600000000000, 1212451200000000000, 1396224000000000000, 1096934400000000000, 1478131200000000000, 647654400000000000, 1432857600000000000, 1067904000000000000, 1410739200000000000, 868838400000000000, 1488153600000000000, 1576627200000000000, 1222732800000000000, 946252800000000000, 503884800000000000, 736732800000000000, 654480000000000000, 1450742400000000000, 919900800000000000, 1096848000000000000, 1196380800000000000, 1528156800000000000, 1340150400000000000, 1152144000000000000, 1506038400000000000, 1417564800000000000, 1207180800000000000, 1561075200000000000, 342921600000000000, 1015200000000000000, 473299200000000000, 904608000000000000, 1258502400000000000, 1335916800000000000, 1147910400000000000, 882489600000000000, 959904000000000000, 727660800000000000, 1459209600000000000, 1275436800000000000, 874281600000000000, 491184000000000000, 933552000000000000, 1099440000000000000, 1442275200000000000, 1088380800000000000, 1254268800000000000, 1331683200000000000, 878256000000000000, 969840000000000000, 1351036800000000000, 1194566400000000000, 670550400000000000, 1208217600000000000, 1419292800000000000, 1473897600000000000, 963532800000000000, 1294272000000000000, 752371200000000000, 1283212800000000000, 1360627200000000000, 1526515200000000000, 818726400000000000, 630720000000000000, 796608000000000000, 1062028800000000000, 1404864000000000000, 1031788800000000000, -29894400000000000, 1481241600000000000, 1494892800000000000, 1338422400000000000, 593308800000000000, 1466985600000000000, 1555459200000000000, 814492800000000000, 1168387200000000000, 1334275200000000000, -346723200000000000, 692841600000000000, 1400630400000000000, 726192000000000000, 372297600000000000, 909964800000000000, 1121040000000000000, 1502236800000000000, 876355200000000000, 522460800000000000, -1434758400000000000, 1042502400000000000, 235180800000000000, 1285804800000000000, 931910400000000000, 1363219200000000000, 1274745600000000000, 1440633600000000000, 1330041600000000000, 1230508800000000000, 577065600000000000, 1114732800000000000, 1509580800000000000, 999216000000000000, 1196640000000000000, 686275200000000000, 1040169600000000000, 1435017600000000000, 1314748800000000000, 1126742400000000000, 938736000000000000, 1458518400000000000, 651196800000000000, 374716800000000000, 1071446400000000000, 1502755200000000000, 768182400000000000, 1503273600000000000, 441590400000000000, 1346803200000000000, 639014400000000000, 1020211200000000000, 761875200000000000, 945648000000000000, 993427200000000000, 1143072000000000000, 776044800000000000, 687571200000000000, 1306886400000000000, 1538438400000000000, 973728000000000000, 1150675200000000000, 1443398400000000000, 1559520000000000000, 967680000000000000, 1575936000000000000, 1222041600000000000, 1398988800000000000, 779673600000000000, 1238630400000000000, 620611200000000000, 1151452800000000000, 1494288000000000000, 698025600000000000, 1317340800000000000, 775440000000000000, 675907200000000000, 1461110400000000000, 841795200000000000, 753321600000000000, 981331200000000000, 1335225600000000000, 1490054400000000000, 693792000000000000, 1213574400000000000, 948153600000000000, 1191456000000000000, 1456876800000000000, 483667200000000000, 826502400000000000, 920419200000000000, 1253577600000000000, -184118400000000000, 789091200000000000, 755913600000000000, 1109808000000000000, 1286755200000000000, 1187222400000000000, 567907200000000000, -670723200000000000, 1452643200000000000, 593827200000000000, 1438128000000000000, 1492646400000000000, 1404172800000000000, 66009600000000000, 1481587200000000000, 1293580800000000000, 674265600000000000, -210470400000000000, 1205107200000000000, 1282521600000000000, 1152489600000000000, 913334400000000000, 470966400000000000, 736387200000000000, 1521590400000000000, 1433116800000000000, 1245110400000000000, 1145577600000000000, 791683200000000000, 968630400000000000, 515203200000000000, 1044316800000000000, 690422400000000000, 1517356800000000000, 1174521600000000000, 1086048000000000000, 1163462400000000000, 710035200000000000, 1506297600000000000, 1406764800000000000, 964396800000000000, 1318291200000000000, 599443200000000000, 1446768000000000000, 1269820800000000000, 1435708800000000000, 1347235200000000000, 816393600000000000, 1325116800000000000, 1059696000000000000, 1114992000000000000, 938044800000000000, 495676800000000000, 827971200000000000, -716774400000000000, 845337600000000000, 491443200000000000, 1188172800000000000, 1542067200000000000, 1508889600000000000, 1431475200000000000, 281318400000000000, 978048000000000000, 878515200000000000, -1156377600000000000, 964483200000000000, 852163200000000000, 1548892800000000000, 929577600000000000, 1106524800000000000, 1460419200000000000, 818985600000000000, 1438300800000000000, 896400000000000000, 1338768000000000000, -364348800000000000, -27907200000000000, 770515200000000000, 1301356800000000000, 1201824000000000000, 1467244800000000000, 1456185600000000000, 1533600000000000000, 538272000000000000, 715219200000000000, 870048000000000000, 1299456000000000000, 1573603200000000000, 688867200000000000, 1308182400000000000, -549763200000000000, 1120176000000000000, 1451952000000000000, 1275004800000000000, 1263945600000000000, 733104000000000000, 1175472000000000000, 1517875200000000000, 653616000000000000, 1545177600000000000, 1218585600000000000, 1572480000000000000, 919296000000000000, 784166400000000000, 1569369600000000000, 1215475200000000000, 1292889600000000000, 728870400000000000, 363916800000000000, 717811200000000000, 883699200000000000, 1497916800000000000, 1144022400000000000, 1593475200000000000, -672710400000000000, 926640000000000000, 1576195200000000000, 1133827200000000000, 857347200000000000, 1476662400000000000, 945820800000000000, 315446400000000000, 746755200000000000, 1443484800000000000, 1178064000000000000, 1343952000000000000, 1417132800000000000, 1328659200000000000, 1406073600000000000, 1317600000000000000, 875232000000000000, 775699200000000000, 510278400000000000, -31622400000000000, -297043200000000000, 941587200000000000, 757555200000000000, 1465344000000000000, 705110400000000000, 1235952000000000000, 793584000000000000, 694051200000000000, 1202774400000000000, 1401840000000000000, 848880000000000000, 1556668800000000000, 1468195200000000000, 1291248000000000000, 975974400000000000, 1513641600000000000, 1159747200000000000, 1154304000000000000, -84326400000000000, 700876800000000000, 1408665600000000000, 1309132800000000000, 778291200000000000, 1585612800000000000, 767232000000000000, 1209600000000000000, 667699200000000000, 1309910400000000000, 799545600000000000, 729820800000000000, 807235200000000000, 1072656000000000000, 1238544000000000000, 1150070400000000000, 884649600000000000, 895708800000000000, 1039478400000000000, 1304899200000000000, 1382313600000000000, 970704000000000000, 913593600000000000, 1355961600000000000, 537580800000000000, 1156896000000000000, 1223251200000000000, 780883200000000000, 681350400000000000, 1389139200000000000, 1245369600000000000, 1112659200000000000, 1529366400000000000, 1451260800000000000, 533347200000000000, 1008892800000000000, 1241136000000000000, 1031011200000000000, 1351728000000000000, 1572912000000000000, 699235200000000000, 1418083200000000000, 1119484800000000000, 815270400000000000, 1536710400000000000, 1210118400000000000, 1192665600000000000, 949363200000000000, 838771200000000000, 1535500800000000000, 518054400000000000, 1214784000000000000, 827712000000000000, 1413849600000000000, 871948800000000000, 1217462400000000000, 757123200000000000, 1542326400000000000, 1520208000000000000, 1210550400000000000, -1322006400000000000, 679708800000000000, 1232668800000000000, 790300800000000000, 989366400000000000, 602294400000000000, 1383264000000000000, 56160000000000000, 1460678400000000000, 1560211200000000000, 719712000000000000, 631238400000000000, 443232000000000000, 1327968000000000000, 1228435200000000000, 863481600000000000, 1130284800000000000, 1368662400000000000, -19612800000000000, 1301616000000000000, 1555977600000000000, 759715200000000000, 1014076800000000000, 1102550400000000000, 1445385600000000000, 1168905600000000000, 903484800000000000, 1456444800000000000, 527472000000000000, 1477872000000000000, 640915200000000000, 1178582400000000000, 709171200000000000, 1219968000000000000, 1562803200000000000, 1474329600000000000, 1551744000000000000, 1197849600000000000, 1430092800000000000, 655948800000000000, 899251200000000000, 1242086400000000000, 1507507200000000000, 804729600000000000, 1240531200000000000, 773366400000000000, 1204675200000000000, 1193616000000000000, 1271030400000000000, 1005609600000000000, 552182400000000000, 1436918400000000000, -686448000000000000, 1138665600000000000, 928195200000000000, 1519862400000000000, 1417996800000000000, 70675200000000000, 962236800000000000, 1499904000000000000, 1513555200000000000, 1587513600000000000, 1510099200000000000, 957139200000000000, 1576454400000000000, 1399507200000000000, 581126400000000000, 1465862400000000000, 1111968000000000000, 1543276800000000000, 1001376000000000000, 1186963200000000000, 1214265600000000000, 758505600000000000, 1180656000000000000, 826761600000000000, 1364428800000000000, 840412800000000000, 621129600000000000, 886550400000000000, 798076800000000000, 1229385600000000000, 1306800000000000000, 952905600000000000, 764899200000000000, 1550102400000000000, 1196208000000000000, 930787200000000000, 1473638400000000000, 425606400000000000, 1031529600000000000, 507513600000000000, 1335744000000000000, 1158796800000000000, 661132800000000000, 1567987200000000000, 1037145600000000000, 1545868800000000000, 760665600000000000, 1280448000000000000, -1207872000000000000, 1003968000000000000, 1025222400000000000, 528508800000000000, 988675200000000000, 1254096000000000000, 1419984000000000000, 1143504000000000000, 1198800000000000000, 1574812800000000000, 1309392000000000000, 1043971200000000000, 1386806400000000000, 922320000000000000, 1304553600000000000, 1515628800000000000, 1529280000000000000, 1556582400000000000, 862444800000000000, 1413763200000000000, 930700800000000000, 1468368000000000000, 236563200000000000, 1311897600000000000, 1495670400000000000, 1325548800000000000, 1509321600000000000, 730080000000000000, 984441600000000000, 1504224000000000000, 1327276800000000000, 1493164800000000000, 962323200000000000, 1482105600000000000, 951264000000000000, 1382572800000000000, 1459987200000000000, 1182729600000000000, -1280880000000000000, 638755200000000000, 652406400000000000, 836179200000000000, 1090800000000000000, 913852800000000000, 1533168000000000000, 1168214400000000000, 1522108800000000000, 1422576000000000000, 1068681600000000000, 880675200000000000, 438307200000000000, -1076803200000000000, 1387497600000000000, 536889600000000000, 1074556800000000000, 720662400000000000, 564192000000000000, 210297600000000000, 747964800000000000, 1455753600000000000, 1285632000000000000, 898646400000000000, 1245974400000000000, 1035158400000000000, 1212105600000000000, 1062460800000000000, 531619200000000000, 735868800000000000, 1443657600000000000, 409276800000000000, 763171200000000000, 1363046400000000000, 1495756800000000000, 1141862400000000000, 1484697600000000000, 1130803200000000000, 694396800000000000, 565228800000000000, 1524700800000000000, 1082332800000000000, 1314576000000000000, 783734400000000000, 429840000000000000, 241833600000000000, -565488000000000000, 175478400000000000, 927504000000000000, 1104451200000000000, 1313971200000000000, 449712000000000000, 1525046400000000000, 830908800000000000, 756345600000000000, 1542585600000000000, 270777600000000000, 1022803200000000000, 1465171200000000000, 16416000000000000, 1166572800000000000, 536198400000000000, 1509408000000000000, 994723200000000000, 1586822400000000000, 1559692800000000000, 1586995200000000000, 1416873600000000000, 1444176000000000000, 1172188800000000000, 1539734400000000000, 1162339200000000000, 1427760000000000000, 1505174400000000000, 786326400000000000, 1317168000000000000, 1483056000000000000, 831945600000000000, 1051747200000000000, 1151280000000000000, 863740800000000000, 845596800000000000, 559958400000000000, 941155200000000000, 649382400000000000, 461376000000000000, 1323993600000000000, 1312934400000000000, 1456704000000000000, 881625600000000000, 1080691200000000000, 1512000000000000000, 1556236800000000000, 1379289600000000000, 844214400000000000, 987984000000000000, 1496707200000000000, 1198108800000000000, 1065398400000000000, 678326400000000000, 766800000000000000, 567734400000000000, 656208000000000000, 1164931200000000000, 996796800000000000, 779414400000000000, 1083283200000000000, 1348704000000000000, 1415059200000000000, 1492473600000000000, 253843200000000000, 563500800000000000, 1569888000000000000, 1304467200000000000, 773625600000000000, 1459296000000000000, 1514505600000000000, 1174262400000000000, 1297123200000000000, 643939200000000000, 791510400000000000, 1001635200000000000, -236995200000000000, 1145404800000000000, 1410825600000000000, 1499299200000000000, 1532476800000000000, 1222819200000000000, 1488240000000000000, 846806400000000000, 1460937600000000000, 1515542400000000000, -1104537600000000000, 1229644800000000000, 1063756800000000000, 709862400000000000, 1561420800000000000, 1284940800000000000, 831513600000000000, 1539302400000000000, 720921600000000000, 1329177600000000000, 798336000000000000, 1229904000000000000, 189216000000000000, 1147996800000000000, 1402358400000000000, 1557187200000000000, 1435536000000000000, 871516800000000000, 1568246400000000000, 1535068800000000000, 705628800000000000, 767836800000000000, 1305504000000000000, -947030400000000000, 1571184000000000000, 550454400000000000, 1586131200000000000, 778809600000000000, -1278201600000000000, 977875200000000000, 1143763200000000000, 1044230400000000000, 1486598400000000000, 1552953600000000000, 1011052800000000000, 1442361600000000000, 972604800000000000, 1054512000000000000, 630806400000000000, 962582400000000000, 675043200000000000, 851990400000000000, 1172707200000000000, 907286400000000000, 730339200000000000, 818812800000000000, 1427068800000000000, 1161648000000000000, 1177372800000000000, 496886400000000000, 1231977600000000000, 13824000000000000, 551491200000000000, 1470355200000000000, 1484006400000000000, 1577664000000000000, 748224000000000000, 726105600000000000, 1422835200000000000, 958348800000000000, 1268006400000000000, 1323302400000000000, 1190592000000000000, 847756800000000000, 1544486400000000000, 1225670400000000000, -291772800000000000, 1008288000000000000, 1518134400000000000, 567043200000000000, 976233600000000000, 887760000000000000, -1191369600000000000, 1009411200000000000, 876700800000000000, 743990400000000000, 799286400000000000, 1285891200000000000, 886464000000000000, 1458604800000000000, 76204800000000000, 662342400000000000, 1270598400000000000, 1104710400000000000, 883526400000000000, 717638400000000000, -630979200000000000, 1491782400000000000, 1314835200000000000, 1145836800000000000, 757641600000000000, 1155772800000000000, 1454371200000000000, 912470400000000000, 1177891200000000000, 713404800000000000, 1343779200000000000, 1509667200000000000, 1498608000000000000, 525398400000000000, 1343260800000000000, 1581638400000000000, 703728000000000000, 717379200000000000, 731030400000000000, 914803200000000000, 1296000000000000000, -64972800000000000, 941414400000000000, 764467200000000000, 532224000000000000, 886118400000000000, 1505433600000000000, 875059200000000000, 1582848000000000000, 864000000000000000, 1372723200000000000, 830822400000000000, 1561680000000000000, 1575331200000000000, 1064966400000000000, 1446163200000000000, 1092268800000000000, 568252800000000000, 1201478400000000000, 1582675200000000000, 417398400000000000, 1191542400000000000, 915062400000000000, 760233600000000000, 859766400000000000, 826588800000000000, 1324252800000000000, 804470400000000000, 1136246400000000000, 813974400000000000, 882230400000000000, 1263427200000000000, 1297900800000000000, 1474848000000000000, 1209427200000000000, 977184000000000000, 545875200000000000, 1320019200000000000, 623289600000000000, -438393600000000000, 1132012800000000000, 1187308800000000000, 1188864000000000000, 930528000000000000, 1284422400000000000, 1282608000000000000, 1481673600000000000, 1127779200000000000, 851299200000000000, 1094601600000000000, 1393200000000000000, 630115200000000000, 972950400000000000, 1260489600000000000, 1083542400000000000, 1012435200000000000, 488419200000000000, 924220800000000000, 1319068800000000000, 625881600000000000, 1322611200000000000, 769651200000000000, 1388966400000000000, 1444262400000000000, -922406400000000000, 891302400000000000, 847065600000000000, 1200960000000000000, 1387324800000000000, 564019200000000000, 945216000000000000, 475804800000000000, 1506384000000000000, 1440028800000000000, 1318377600000000000, 975542400000000000, 920246400000000000, 533174400000000000, 1406851200000000000, 765417600000000000, 1384732800000000000, 842832000000000000, 1435622400000000000, 1320105600000000000, 1402012800000000000, 1004486400000000000, 1269907200000000000, 705888000000000000, 893894400000000000, 1325203200000000000, 1236729600000000000, 1303084800000000000, 938131200000000000, 1502150400000000000, 628473600000000000, 1327449600000000000, 1354752000000000000, 830736000000000000, 858038400000000000, 1450310400000000000, 1280188800000000000, 878601600000000000, 768009600000000000, 1464739200000000000, 834364800000000000, 1542153600000000000, 911779200000000000, 1033430400000000000, 723772800000000000, 1166140800000000000, 889660800000000000, -53481600000000000, 1430352000000000000, 1260230400000000000, 906336000000000000, 1444003200000000000, 919987200000000000, 1131062400000000000, 1328486400000000000, 387763200000000000, 1338854400000000000, 520473600000000000, 951782400000000000, 852249600000000000, 1471564800000000000, 763776000000000000, 454118400000000000, -353203200000000000, 1007078400000000000, 559785600000000000, 784512000000000000, 1519603200000000000, 825465600000000000, 1412035200000000000, 1268265600000000000, 803779200000000000, 715305600000000000, 593654400000000000, 925430400000000000, 980726400000000000, 1257206400000000000, 1467331200000000000, 1036022400000000000, 893721600000000000, 567129600000000000, 805507200000000000, 519868800000000000, 744249600000000000, 600480000000000000, 954374400000000000, 1252972800000000000, -63072000000000000, 1440979200000000000, 1076025600000000000, 1230854400000000000, 1496275200000000000, 758246400000000000, 744595200000000000, 574473600000000000, 1112140800000000000, 1350518400000000000, 1377820800000000000, 1561593600000000000, 1575244800000000000, 1418774400000000000, 1064880000000000000, 724636800000000000, 1569456000000000000, 1480982400000000000, 1436745600000000000, 839548800000000000, 1447804800000000000, 1259798400000000000, 983318400000000000, 10108800000000000, -365904000000000000, 1049673600000000000, 1160438400000000000, 820195200000000000, 1371513600000000000, 1017619200000000000, 1582588800000000000, 1242345600000000000, 534556800000000000, 1283299200000000000, 1178150400000000000, 1509926400000000000, 934848000000000000, 503539200000000000, 404006400000000000, 1377216000000000000, 5875200000000000, 702604800000000000, 1122854400000000000, 746841600000000000, 657417600000000000, 882144000000000000, 1433462400000000000, 725673600000000000, 991353600000000000, 1529020800000000000, 1284508800000000000, 477187200000000000, 1273449600000000000, 1439337600000000000, 1428278400000000000, 985910400000000000, 554601600000000000, -993686400000000000, 587779200000000000, 1059609600000000000, 1495411200000000000, 842227200000000000, 1223424000000000000, 1202860800000000000, 472953600000000000, 970617600000000000, 1169683200000000000, 1280275200000000000, 1589932800000000000, 1125446400000000000, 1479340800000000000, 1291334400000000000, 749433600000000000, 597542400000000000, -82944000000000000, 624844800000000000, 100828800000000000, 835920000000000000, 1203465600000000000, 1033344000000000000, 509328000000000000, -157507200000000000, 931478400000000000, 1154390400000000000, 700963200000000000, 1309219200000000000, 667785600000000000, 1541462400000000000, 999561600000000000, 888969600000000000, 800496000000000000, 1032739200000000000, 788659200000000000, 972432000000000000, 802310400000000000, 462067200000000000, -34646400000000000, 360201600000000000, 741398400000000000, 1306368000000000000] FI_PortfolioHoldingsAs-OfDate - difference of value mapping : [1580428800000000000, 1577750400000000000, 1582934400000000000, 1572480000000000000, 1585612800000000000, 1585526400000000000, 1561852800000000000, 1575072000000000000, 1585267200000000000, 1567209600000000000, 1569801600000000000, 1564531200000000000, 1588204800000000000, 1593388800000000000, 1593043200000000000, 1596153600000000000, 1603929600000000000, 1612051200000000000, 1614297600000000000, 1551312000000000000, 1590710400000000000, 1590883200000000000, 1593475200000000000, 1596067200000000000, 1598832000000000000, 1601424000000000000, 1604016000000000000, 1609372800000000000, 1611792000000000000, 1604102400000000000, 1606694400000000000, 1609286400000000000, 1611878400000000000, 1614470400000000000] F_FossilFuelGrade - difference of value mapping : [0, 1, 3, 4, 5, 6] D_DeforestationGrade - difference of value mapping : [1, 2, 3, 4, 5, 6] GE_GenderEqualityGrade - difference of value mapping : [0, 1, 3, 4, 5, 6] G_CivilianFirearmGrade - difference of value mapping : [1, 3, 4, 5, 6] W_MilitaryWeaponGrade - difference of value mapping : [1, 3, 4, 5, 6] T_TobaccoGrade - difference of value mapping : [1, 2, 3, 4, 5, 6] FP_PerformanceAs-OfDate - difference of value mapping : [1585612800000000000, 1588204800000000000, 1596153600000000000, 1590883200000000000, 1593475200000000000, 1598832000000000000, 1601424000000000000, 1604102400000000000, 1609372800000000000, 1612051200000000000, 1614470400000000000, -9223372036854775808] P_PrisonIndustrialComplexGrade - difference of value mapping : [0, 1, 3, 4, 5, 6] F_Clean200_w_isempty - new column D_RiskProducer_a_isempty - new column F_CoalIndustry_w_isempty - new column G_GunManufacturer_a_isempty - new column P_BorderIndustryHR_w_isempty - new column F_CarbonUnderground_a_isempty - new column D_RiskFinancier_w_isempty - new column G_GunManufacturer_w_isempty - new column P_AllFlagged_w_isempty - new column D_RiskFinancier_a_isempty - new column P_AllFlagged_a_isempty - new column W_MilitaryWeapon_w_isempty - new column G_CivilianFirearm_w_isempty - new column W_ClusterMunitions_w_isempty - new column F_30Coal-FiredUtilities_w_isempty - new column T_TobaccoProducer_a_isempty - new column F_Oil/GasIndustry_w_isempty - new column P_BorderIndustry_w_isempty - new column D_RiskProducer_w_isempty - new column P_PrisonIndustry_a_isempty - new column F_30Coal-FiredUtilities_a_isempty - new column P_AllFlaggedHR_a_isempty - new column P_PrisonIndustryHR_w_isempty - new column P_PrisonIndustryHR_a_isempty - new column W_MilitaryContractors_a_isempty - new column W_NuclearWeapons_w_isempty - new column F_Clean200_a_isempty - new column F_CoalIndustry_a_isempty - new column P_BorderIndustry_a_isempty - new column F_Fossil-FiredUtilities_w_isempty - new column F_FossilFuelHoldings_a_isempty - new column D_RiskConsumerBrand_a_isempty - new column P_PrisonIndustry_w_isempty - new column P_PrivatePrisonOperators_w_isempty - new column F_Oil/GasIndustry_a_isempty - new column T_Tobacco-Promoting_a_isempty - new column D_RiskConsumerBrand_w_isempty - new column G_CivilianFirearm_a_isempty - new column P_PrivatePrisonOperators_a_isempty - new column G_GunRetailer_a_isempty - new column W_MilitaryWeapon_a_isempty - new column F_Fossil-FiredUtilities_a_isempty - new column F_FossilFuelHoldings_w_isempty - new column F_CarbonUnderground_w_isempty - new column T_TobaccoProducer_w_isempty - new column P_AllFlaggedHR_w_isempty - new column W_MilitaryContractors_w_isempty - new column W_NuclearWeapons_a_isempty - new column W_ClusterMunitions_a_isempty - new column P_BorderIndustryHR_a_isempty - new column G_GunRetailer_w_isempty - new column T_Tobacco-Promoting_w_isempty - new column G_GunRetailer_c_isempty - new column P_BorderIndustryHR_c_isempty - new column W_MilitaryContractors_c_isempty - new column P_PrisonIndustryHR_c_isempty - new column F_Oil/GasIndustry_c_isempty - new column P_BorderIndustry_c_isempty - new column F_30Coal-FiredUtilities_c_isempty - new column P_PrisonIndustry_c_isempty - new column T_TobaccoProducer_c_isempty - new column F_FossilFuelHoldings_c_isempty - new column G_GunManufacturer_c_isempty - new column F_CarbonUnderground_c_isempty - new column P_PrivatePrisonOperators_c_isempty - new column W_ClusterMunitions_c_isempty - new column W_MilitaryWeapon_c_isempty - new column P_AllFlaggedHR_c_isempty - new column T_Tobacco-Promoting_c_isempty - new column F_CoalIndustry_c_isempty - new column D_RiskConsumerBrand_c_isempty - new column F_Clean200_c_isempty - new column D_RiskFinancier_c_isempty - new column D_RiskProducer_c_isempty - new column W_NuclearWeapons_c_isempty - new column F_Fossil-FiredUtilities_c_isempty - new column G_CivilianFirearm_c_isempty - new column P_AllFlagged_c_isempty - new column FI_ShareclassType_ETF - new column FI_ShareclassType_Open-end mutual fund - new column FI_CategoryGroup_Allocation Funds - new column FI_CategoryGroup_International Equity Funds - new column FI_CategoryGroup_Sector Equity Funds - new column FI_CategoryGroup_U.S. Equity Fund - new column
def get_redundant_pairs(df):
'''Get diagonal and lower triangular pairs of correlation matrix'''
pairs_to_drop = set()
cols = df.columns
for i in range(0, df.shape[1]):
for j in range(0, i+1):
pairs_to_drop.add((cols[i], cols[j]))
return pairs_to_drop
def get_top_correlations(df, n=10):
au_corr = df.corr().unstack()
labels_to_drop = get_redundant_pairs(df)
au_corr = au_corr.drop(labels=labels_to_drop).sort_values(ascending=False)
return au_corr[0:n]
correlation_threshold=0.95
for category in ['FI','FP','F','D','GE','G','W','T','P']:
filter=preprocess_df.filter(regex=category+"_.*",axis=1).select_dtypes(np.number)
if(len(filter.columns)>0):
print("Top Absolute Correlations")
tmp_corr=get_top_correlations(filter, 40)
print(tmp_corr[tmp_corr >= correlation_threshold].sort_index())
Top Absolute Correlations
Series([], dtype: float64)
Top Absolute Correlations
Series([], dtype: float64)
Top Absolute Correlations
F_30Coal-FiredUtilities_a_isempty F_30Coal-FiredUtilities_c_isempty 1.000000
F_30Coal-FiredUtilities_w_isempty F_30Coal-FiredUtilities_a_isempty 1.000000
F_30Coal-FiredUtilities_c_isempty 1.000000
F_CarbonUnderground_a_isempty F_CarbonUnderground_c_isempty 1.000000
F_CarbonUnderground_w_isempty 1.000000
F_CarbonUnderground_w_isempty F_CarbonUnderground_c_isempty 1.000000
F_Clean200_a_isempty F_Clean200_c_isempty 1.000000
F_Clean200_w_isempty F_Clean200_a_isempty 1.000000
F_Clean200_c_isempty 1.000000
F_CoalIndustry_a_isempty F_CoalIndustry_c_isempty 1.000000
F_CoalIndustry_w_isempty F_CoalIndustry_a_isempty 1.000000
F_CoalIndustry_c_isempty 1.000000
F_Fossil-FiredUtilities_a_isempty F_Fossil-FiredUtilities_c_isempty 1.000000
F_Fossil-FiredUtilities_w_isempty F_Fossil-FiredUtilities_a_isempty 1.000000
F_Fossil-FiredUtilities_c_isempty 1.000000
F_FossilFuelHoldings_a_isempty F_FossilFuelHoldings_c_isempty 1.000000
F_FossilFuelHoldings_w_isempty 1.000000
F_FossilFuelHoldings_c F_Oil/GasIndustry_c 0.952528
F_FossilFuelHoldings_w_isempty F_FossilFuelHoldings_c_isempty 1.000000
F_Oil/GasIndustry_a_isempty F_Oil/GasIndustry_c_isempty 1.000000
F_Oil/GasIndustry_w_isempty F_Oil/GasIndustry_a_isempty 1.000000
F_Oil/GasIndustry_c_isempty 1.000000
F_TotalEmissions1+2 F_TotalEmissions1+2+3 0.989819
dtype: float64
Top Absolute Correlations
D_RiskConsumerBrand_a_isempty D_RiskConsumerBrand_c_isempty 1.0
D_RiskConsumerBrand_w_isempty 1.0
D_RiskConsumerBrand_w_isempty D_RiskConsumerBrand_c_isempty 1.0
D_RiskFinancier_a_isempty D_RiskFinancier_c_isempty 1.0
D_RiskFinancier_w_isempty D_RiskFinancier_a_isempty 1.0
D_RiskFinancier_c_isempty 1.0
D_RiskProducer_a_isempty D_RiskProducer_c_isempty 1.0
D_RiskProducer_w_isempty 1.0
D_RiskProducer_w_isempty D_RiskProducer_c_isempty 1.0
dtype: float64
Top Absolute Correlations
Series([], dtype: float64)
Top Absolute Correlations
G_CivilianFirearm_a_isempty G_CivilianFirearm_c_isempty 1.0
G_CivilianFirearm_w_isempty G_CivilianFirearm_a_isempty 1.0
G_CivilianFirearm_c_isempty 1.0
G_GunManufacturer_a_isempty G_GunManufacturer_c_isempty 1.0
G_GunManufacturer_w_isempty 1.0
G_GunManufacturer_w_isempty G_GunManufacturer_c_isempty 1.0
G_GunRetailer_a_isempty G_GunRetailer_c_isempty 1.0
G_GunRetailer_w_isempty 1.0
G_GunRetailer_w_isempty G_GunRetailer_c_isempty 1.0
dtype: float64
Top Absolute Correlations
W_ClusterMunitions_a_isempty W_ClusterMunitions_c_isempty 1.000000
W_ClusterMunitions_w_isempty W_ClusterMunitions_a_isempty 1.000000
W_ClusterMunitions_c_isempty 1.000000
W_MilitaryContractors_a_isempty W_MilitaryContractors_c_isempty 1.000000
W_MilitaryContractors_w_isempty 1.000000
W_MilitaryWeapon_a_isempty 0.985708
W_MilitaryWeapon_c_isempty 0.985708
W_MilitaryContractors_c_isempty W_MilitaryWeapon_c_isempty 0.985708
W_MilitaryContractors_w_isempty W_MilitaryContractors_c_isempty 1.000000
W_MilitaryWeapon_c_isempty 0.985708
W_MilitaryWeapon_a W_MilitaryContractors_a 0.988714
W_MilitaryWeapon_a_isempty W_MilitaryContractors_c_isempty 0.985708
W_MilitaryContractors_w_isempty 0.985708
W_MilitaryWeapon_c_isempty 1.000000
W_MilitaryWeapon_c W_MilitaryContractors_c 0.997888
W_MilitaryWeapon_w W_MilitaryContractors_w 0.986072
W_MilitaryWeapon_w_isempty W_MilitaryContractors_a_isempty 0.985708
W_MilitaryContractors_c_isempty 0.985708
W_MilitaryContractors_w_isempty 0.985708
W_MilitaryWeapon_a_isempty 1.000000
W_MilitaryWeapon_c_isempty 1.000000
W_NuclearWeapons_a_isempty W_NuclearWeapons_c_isempty 1.000000
W_NuclearWeapons_w_isempty W_NuclearWeapons_a_isempty 1.000000
W_NuclearWeapons_c_isempty 1.000000
dtype: float64
Top Absolute Correlations
T_Tobacco-Promoting_a_isempty T_Tobacco-Promoting_c_isempty 1.000000
T_Tobacco-Promoting_w_isempty 1.000000
T_Tobacco-Promoting_w_isempty T_Tobacco-Promoting_c_isempty 1.000000
T_TobaccoGrade T_TobaccoProducer_a_isempty 0.951874
T_TobaccoProducer_c_isempty 0.951874
T_TobaccoProducer_w_isempty 0.951874
T_TobaccoProducer_a_isempty T_TobaccoProducer_c_isempty 1.000000
T_TobaccoProducer_w_isempty 1.000000
T_TobaccoProducer_w_isempty T_TobaccoProducer_c_isempty 1.000000
dtype: float64
Top Absolute Correlations
P_AllFlaggedHR_a_isempty P_AllFlaggedHR_c_isempty 1.000000
P_AllFlaggedHR_w_isempty 1.000000
P_AllFlaggedHR_w_isempty P_AllFlaggedHR_c_isempty 1.000000
P_AllFlagged_a P_BorderIndustry_a 0.965269
P_AllFlagged_a_isempty P_AllFlagged_c_isempty 1.000000
P_AllFlagged_c P_BorderIndustry_c 0.978158
P_AllFlagged_w_isempty P_AllFlagged_a_isempty 1.000000
P_AllFlagged_c_isempty 1.000000
P_BorderIndustryHR_a_isempty P_BorderIndustryHR_c_isempty 1.000000
P_BorderIndustryHR_w_isempty P_BorderIndustryHR_a_isempty 1.000000
P_BorderIndustryHR_c_isempty 1.000000
P_BorderIndustry_a_isempty P_BorderIndustry_c_isempty 1.000000
P_BorderIndustry_w_isempty P_BorderIndustry_a_isempty 1.000000
P_BorderIndustry_c_isempty 1.000000
P_PrisonIndustryHR_a_isempty P_PrisonIndustryHR_c_isempty 1.000000
P_PrisonIndustryHR_w_isempty P_PrisonIndustryHR_a_isempty 1.000000
P_PrisonIndustryHR_c_isempty 1.000000
P_PrisonIndustry_a_isempty P_PrisonIndustry_c_isempty 1.000000
P_PrisonIndustry_w_isempty 1.000000
P_PrisonIndustry_w_isempty P_PrisonIndustry_c_isempty 1.000000
P_PrivatePrisonOperators_a_isempty P_PrivatePrisonOperators_c_isempty 1.000000
P_PrivatePrisonOperators_w_isempty P_PrivatePrisonOperators_a_isempty 1.000000
P_PrivatePrisonOperators_c_isempty 1.000000
dtype: float64
def correlation(dataset, threshold):
col_corr = set() # Set of all the names of deleted columns
corr_matrix = dataset.corr()
corr_results=[]
for i in range(len(corr_matrix.columns)):
for j in range(i):
if (corr_matrix.iloc[i, j] >= threshold) and (corr_matrix.columns[j] not in col_corr):
colname = corr_matrix.columns[i] # getting the name of column
col_corr.add(colname)
if colname in dataset.columns:
del dataset[colname] # deleting the column from the dataset
corr_results.append({
'Deleted column': colname,
'Correlation column': corr_matrix.columns[j],
'Correlation': corr_matrix.iloc[i, j]
})
return pd.DataFrame(corr_results)
corr_results=correlation(preprocess_df, correlation_threshold)
pd.set_option('display.max_rows', None)
corr_results
| Deleted column | Correlation column | Correlation | |
|---|---|---|---|
| 0 | F_Oil/GasIndustry_c | F_FossilFuelHoldings_c | 0.952528 |
| 1 | F_TotalEmissions1+2+3 | F_TotalEmissions1+2 | 0.989819 |
| 2 | W_MilitaryContractors_c | W_MilitaryWeapon_c | 0.997888 |
| 3 | W_MilitaryContractors_w | W_MilitaryWeapon_w | 0.986072 |
| 4 | W_MilitaryContractors_a | W_MilitaryWeapon_a | 0.988714 |
| 5 | P_BorderIndustry_c | P_AllFlagged_c | 0.978158 |
| 6 | P_BorderIndustry_a | P_AllFlagged_a | 0.965269 |
| 7 | G_GunManufacturer_w_isempty | G_GunManufacturer_a_isempty | 1.000000 |
| 8 | D_RiskFinancier_a_isempty | D_RiskFinancier_w_isempty | 1.000000 |
| 9 | P_AllFlagged_a_isempty | P_AllFlagged_w_isempty | 1.000000 |
| 10 | T_TobaccoProducer_a_isempty | T_TobaccoGrade | 0.951874 |
| 11 | D_RiskProducer_w_isempty | D_RiskProducer_a_isempty | 1.000000 |
| 12 | F_30Coal-FiredUtilities_a_isempty | F_30Coal-FiredUtilities_w_isempty | 1.000000 |
| 13 | P_PrisonIndustryHR_a_isempty | P_PrisonIndustryHR_w_isempty | 1.000000 |
| 14 | W_MilitaryContractors_a_isempty | W_MilitaryWeapon_w_isempty | 0.985708 |
| 15 | F_Clean200_a_isempty | F_Clean200_w_isempty | 1.000000 |
| 16 | F_CoalIndustry_a_isempty | F_CoalIndustry_w_isempty | 1.000000 |
| 17 | P_BorderIndustry_a_isempty | P_BorderIndustry_w_isempty | 1.000000 |
| 18 | P_PrisonIndustry_w_isempty | P_PrisonIndustry_a_isempty | 1.000000 |
| 19 | F_Oil/GasIndustry_a_isempty | F_Oil/GasIndustry_w_isempty | 1.000000 |
| 20 | D_RiskConsumerBrand_w_isempty | D_RiskConsumerBrand_a_isempty | 1.000000 |
| 21 | G_CivilianFirearm_a_isempty | G_CivilianFirearm_w_isempty | 1.000000 |
| 22 | P_PrivatePrisonOperators_a_isempty | P_PrivatePrisonOperators_w_isempty | 1.000000 |
| 23 | W_MilitaryWeapon_a_isempty | W_MilitaryWeapon_w_isempty | 1.000000 |
| 24 | F_Fossil-FiredUtilities_a_isempty | F_Fossil-FiredUtilities_w_isempty | 1.000000 |
| 25 | F_FossilFuelHoldings_w_isempty | F_FossilFuelHoldings_a_isempty | 1.000000 |
| 26 | F_CarbonUnderground_w_isempty | F_CarbonUnderground_a_isempty | 1.000000 |
| 27 | T_TobaccoProducer_w_isempty | T_TobaccoGrade | 0.951874 |
| 28 | P_AllFlaggedHR_w_isempty | P_AllFlaggedHR_a_isempty | 1.000000 |
| 29 | W_MilitaryContractors_w_isempty | W_MilitaryWeapon_w_isempty | 0.985708 |
| 30 | W_NuclearWeapons_a_isempty | W_NuclearWeapons_w_isempty | 1.000000 |
| 31 | W_ClusterMunitions_a_isempty | W_ClusterMunitions_w_isempty | 1.000000 |
| 32 | P_BorderIndustryHR_a_isempty | P_BorderIndustryHR_w_isempty | 1.000000 |
| 33 | G_GunRetailer_w_isempty | G_GunRetailer_a_isempty | 1.000000 |
| 34 | T_Tobacco-Promoting_w_isempty | T_Tobacco-Promoting_a_isempty | 1.000000 |
| 35 | G_GunRetailer_c_isempty | G_GunRetailer_a_isempty | 1.000000 |
| 36 | P_BorderIndustryHR_c_isempty | P_BorderIndustryHR_w_isempty | 1.000000 |
| 37 | W_MilitaryContractors_c_isempty | W_MilitaryWeapon_w_isempty | 0.985708 |
| 38 | P_PrisonIndustryHR_c_isempty | P_PrisonIndustryHR_w_isempty | 1.000000 |
| 39 | F_Oil/GasIndustry_c_isempty | F_Oil/GasIndustry_w_isempty | 1.000000 |
| 40 | P_BorderIndustry_c_isempty | P_BorderIndustry_w_isempty | 1.000000 |
| 41 | F_30Coal-FiredUtilities_c_isempty | F_30Coal-FiredUtilities_w_isempty | 1.000000 |
| 42 | P_PrisonIndustry_c_isempty | P_PrisonIndustry_a_isempty | 1.000000 |
| 43 | T_TobaccoProducer_c_isempty | T_TobaccoGrade | 0.951874 |
| 44 | F_FossilFuelHoldings_c_isempty | F_FossilFuelHoldings_a_isempty | 1.000000 |
| 45 | G_GunManufacturer_c_isempty | G_GunManufacturer_a_isempty | 1.000000 |
| 46 | F_CarbonUnderground_c_isempty | F_CarbonUnderground_a_isempty | 1.000000 |
| 47 | P_PrivatePrisonOperators_c_isempty | P_PrivatePrisonOperators_w_isempty | 1.000000 |
| 48 | W_ClusterMunitions_c_isempty | W_ClusterMunitions_w_isempty | 1.000000 |
| 49 | W_MilitaryWeapon_c_isempty | W_MilitaryWeapon_w_isempty | 1.000000 |
| 50 | P_AllFlaggedHR_c_isempty | P_AllFlaggedHR_a_isempty | 1.000000 |
| 51 | T_Tobacco-Promoting_c_isempty | T_Tobacco-Promoting_a_isempty | 1.000000 |
| 52 | F_CoalIndustry_c_isempty | F_CoalIndustry_w_isempty | 1.000000 |
| 53 | D_RiskConsumerBrand_c_isempty | D_RiskConsumerBrand_a_isempty | 1.000000 |
| 54 | F_Clean200_c_isempty | F_Clean200_w_isempty | 1.000000 |
| 55 | D_RiskFinancier_c_isempty | D_RiskFinancier_w_isempty | 1.000000 |
| 56 | D_RiskProducer_c_isempty | D_RiskProducer_a_isempty | 1.000000 |
| 57 | W_NuclearWeapons_c_isempty | W_NuclearWeapons_w_isempty | 1.000000 |
| 58 | F_Fossil-FiredUtilities_c_isempty | F_Fossil-FiredUtilities_w_isempty | 1.000000 |
| 59 | G_CivilianFirearm_c_isempty | G_CivilianFirearm_w_isempty | 1.000000 |
| 60 | P_AllFlagged_c_isempty | P_AllFlagged_w_isempty | 1.000000 |
print("Remaining features",len(preprocess_df.columns))
Remaining features 127
#preprocess_df.to_csv('/kaggle/input/fossil-free-funds/prep/fossilfund_dataset_prep.csv', index=False)
#preprocess_df.to_csv('~/Downloads/fossilfund_dataset_prep.csv', index=False)
fig = plt.figure(figsize=(25, 20))
sns.heatmap(preprocess_df.reindex(sorted(preprocess_df.columns), axis=1).corr(method='pearson'),
cmap='RdBu_r',
annot=False,
linewidth=0.5)
<AxesSubplot:>
Additional information :
sns.clustermap(preprocess_df.corr(method='pearson'), cmap='RdBu_r', figsize=(30, 30))
C:\Users\Thinkpad\anaconda3\lib\site-packages\seaborn\matrix.py:654: UserWarning: Clustering large matrix with scipy. Installing `fastcluster` may give better performance. warnings.warn(msg)
<seaborn.matrix.ClusterGrid at 0x1ad4399fd90>
sns.clustermap(preprocess_df.filter(regex=".*_a.*",axis=1).corr(method='pearson'), cmap='RdBu_r', figsize=(10, 10))
<seaborn.matrix.ClusterGrid at 0x1ad3d0ea250>
sns.clustermap(preprocess_df.filter(regex=".*_c.*",axis=1).corr(method='pearson'), cmap='RdBu_r', figsize=(10, 10))
<seaborn.matrix.ClusterGrid at 0x1ad3e591880>
sns.clustermap(preprocess_df.filter(regex=".*_w.*",axis=1).corr(method='pearson'), cmap='RdBu_r', figsize=(10, 10))
<seaborn.matrix.ClusterGrid at 0x1ad40e89c70>
sns.clustermap(preprocess_df.filter(regex=".*_isempty",axis=1).corr(method='pearson'), cmap='RdBu_r', figsize=(10, 10))
<seaborn.matrix.ClusterGrid at 0x1ad34aa7880>
target = cols_df[ (cols_df['Category']=='Financial performance') & (cols_df['Type']=='Continuous') ]['Short column name']
correlations=preprocess_df.corr(method='pearson')[target]#.sort_values(ascending=False)
print('Top positive correlations with ReturnsY1')
correlations['FP_ReturnsY1'].sort_values(ascending=False)[0:15]
Top positive correlations with ReturnsY1
FP_ReturnsY1 1.000000 FP_ReturnsY5 0.808227 FP_ReturnsY3 0.806222 FI_PortfolioHoldingsAs-OfDate 0.516813 FP_ReturnsY10 0.499320 P_PrivatePrisonOperators_w_isempty 0.435946 P_PrisonIndustrialComplexGrade 0.405564 F_FossilFuelGrade 0.378871 P_PrisonIndustryHR_w_isempty 0.367496 F_CarbonUnderground_a_isempty 0.288311 P_BorderIndustryHR_w_isempty 0.285739 P_PrisonIndustry_a_isempty 0.282405 F_Oil/GasIndustry_w_isempty 0.278394 P_AllFlaggedHR_a_isempty 0.274427 F_FossilFuelHoldings_a_isempty 0.262311 Name: FP_ReturnsY1, dtype: float64
print('Top negative correlations with ReturnsY1')
correlations['FP_ReturnsY1'].sort_values(ascending=False)[-5:]
Top negative correlations with ReturnsY1
F_CarbonUnderground_w -0.217926 F_Oil/GasIndustry_w -0.276647 F_FossilFuelHoldings_w -0.313201 F_RelativeCarbonIntensity -0.361362 F_RelativeCarbonFootprint -0.421600 Name: FP_ReturnsY1, dtype: float64
correlations.filter(regex="FI_AssetManager.*",axis=0)['FP_ReturnsY1'].sort_values(ascending=False)
Series([], Name: FP_ReturnsY1, dtype: float64)
target = 'FP_ReturnsY1'
nb_samples=5000
def chunks(l, n):
n = max(1, n)
return (l[i:i+n] for i in range(0, len(l), n))
for category in ['FI','FP','F','D','GE','G','W','T','P']:
index_cols=preprocess_df.filter(regex="^"+category+"_.*",axis=1).columns
#for category in categories:
# index_cols=list(set(getColCategory(category)) & set(preprocess_df.select_dtypes(np.number).columns))
index_cols_numb_only=preprocess_df[index_cols].select_dtypes(exclude=object).columns
index_cols_list=list(chunks(index_cols_numb_only, 5))
number_sets=len(index_cols_list)
for i in range(0,len(index_cols_list)):
#Use sampling technique to speedup the process
print("Pairplots for "+category+" numeric features - set "+str(i+1)+"/"+str(number_sets))
plot= sns.pairplot(data=preprocess_df.sample(nb_samples), y_vars=target, x_vars=index_cols_list.pop(), height=3.5, aspect=1.1)
plt.tight_layout()
plt.show()
Pairplots for FI numeric features - set 1/3
Pairplots for FI numeric features - set 2/3
Pairplots for FI numeric features - set 3/3
Pairplots for FP numeric features - set 1/1
Pairplots for F numeric features - set 1/7
Pairplots for F numeric features - set 2/7
Pairplots for F numeric features - set 3/7
Pairplots for F numeric features - set 4/7
Pairplots for F numeric features - set 5/7
Pairplots for F numeric features - set 6/7
Pairplots for F numeric features - set 7/7
Pairplots for D numeric features - set 1/3
Pairplots for D numeric features - set 2/3
Pairplots for D numeric features - set 3/3
Pairplots for GE numeric features - set 1/1
Pairplots for G numeric features - set 1/3
Pairplots for G numeric features - set 2/3
Pairplots for G numeric features - set 3/3
Pairplots for W numeric features - set 1/3
Pairplots for W numeric features - set 2/3
Pairplots for W numeric features - set 3/3
Pairplots for T numeric features - set 1/2
Pairplots for T numeric features - set 2/2
Pairplots for P numeric features - set 1/6
Pairplots for P numeric features - set 2/6
Pairplots for P numeric features - set 3/6
Pairplots for P numeric features - set 4/6
Pairplots for P numeric features - set 5/6
Pairplots for P numeric features - set 6/6
for date_col in date_cols:
preprocess_df[date_col]=preprocess_df[date_col].apply(pd.to_datetime, errors='coerce')
preprocess_df['FP_ReturnsY1_diff']=df['FP_ReturnsY1'].diff()
# create figure and axis objects with subplots()
fig,ax=plt.subplots(figsize=(8,5))
ax.plot(preprocess_df.groupby(['FP_PerformanceAs-OfDate'])['FP_ReturnsY1'].mean(), label='Target')
ax.set_xlabel("Year")
ax.set_ylabel("FP_ReturnsY1",color='C0')
ax2=ax.twinx()
# make a plot with different y-axis using second axis object
ax2.plot(preprocess_df.groupby(['FP_PerformanceAs-OfDate'])['FP_ReturnsY1_diff'].mean(), color='g', label='Differenciation')
ax2.set_ylabel("FP_ReturnsY1_diff",color='g')
plt.show()
# create figure and axis objects with subplots()
fig,ax=plt.subplots(figsize=(8,5))
ax.plot(preprocess_df.groupby(['FI_PortfolioHoldingsAs-OfDate'])['FP_ReturnsY1'].mean(), label='Target')
ax.set_xlabel("Year")
ax.set_ylabel("FP_ReturnsY1",color='C0')
ax2=ax.twinx()
# make a plot with different y-axis using second axis object
ax2.plot(preprocess_df.groupby(['FI_PortfolioHoldingsAs-OfDate'])['FP_ReturnsY1_diff'].mean(), color='g', label='Differenciation')
ax2.set_ylabel("FP_ReturnsY1_diff",color='g')
plt.show()
For assessing the accuracy of our model (cost function), we will use the MAE (Mean Absolute Error) method:
Assess individual modeles
test_size_split=0.4
#clean_df=pd.read_csv('/kaggle/input/fossil-free-funds/prep/fossilfund_dataset_prep.csv')
clean_df=pd.read_csv('~/Downloads/fossilfund_dataset_prep.csv')
print("How many non numerical columns:",len(clean_df.select_dtypes(['number']).columns)-len(clean_df.columns))
How many non numerical columns: 0
#Remove FP
clean_df.drop(columns=['FP_ReturnsY3','FP_ReturnsY5','FP_ReturnsY10'], axis=1, inplace=True)
#All rows contain null values
print("No. of rows containing null values", len(clean_df.isna().sum(axis=1).eq(0) ))
print("Total no. of columns in the dataframe", len(clean_df.columns))
print("No. of numerical columns ", len(clean_df.select_dtypes(np.number).columns))
print("No. of columns containing null values", len(clean_df.columns[clean_df.isna().any()]))
print("Details of columns containing null values", clean_df.columns[clean_df.isna().any()])
print("No. of columns not containing null values", len(clean_df.columns[clean_df.notna().all()]))
#clean_df[clean_df.isna().any(axis=1)]
No. of rows containing null values 93718 Total no. of columns in the dataframe 124 No. of numerical columns 124 No. of columns containing null values 0 Details of columns containing null values Index([], dtype='object') No. of columns not containing null values 124
target = 'FP_ReturnsY1'
X = clean_df.drop(columns=target)
y = clean_df[target]
# How many features do you want to keep?
k = 20
# Create the selecter object
skb = SelectKBest(f_regression, k=k)
# Fit the selecter to your data
X_new = skb.fit_transform(X, y)
# Extract the top k features from the `pvalues_` attribute
k_feat = np.argsort(skb.pvalues_)[:k]
# Reduce the dataframe according to the selecter
df_reduced = clean_df[X.columns[k_feat]]
# instantiate SelectKBest to determine 20 best features
best_features = SelectKBest(score_func=f_regression, k=k)
fit = best_features.fit(X,y)
df_scores = pd.DataFrame(fit.scores_)
df_columns = pd.DataFrame(X.columns)
# concatenate dataframes
feature_scores = pd.concat([df_columns, df_scores],axis=1)
feature_scores.columns = ['Feature_Name','Score'] # name output columns
topk_features=feature_scores.nlargest(k,'Score')
print(topk_features) # print top k best features
Feature_Name Score 2 FI_PortfolioHoldingsAs-OfDate 34153.307546 114 P_PrivatePrisonOperators_w_isempty 21989.784315 23 F_RelativeCarbonFootprint 20258.563683 73 P_PrisonIndustrialComplexGrade 18449.127327 5 F_FossilFuelGrade 15706.956740 109 P_PrisonIndustryHR_w_isempty 14632.881338 24 F_RelativeCarbonIntensity 14075.677581 7 F_FossilFuelHoldings_w 10192.960540 98 F_CarbonUnderground_a_isempty 8496.207382 97 P_BorderIndustryHR_w_isempty 8331.910689 107 P_PrisonIndustry_a_isempty 8121.849351 105 F_Oil/GasIndustry_w_isempty 7873.544126 15 F_Oil/GasIndustry_w 7766.832095 108 P_AllFlaggedHR_a_isempty 7632.567155 112 F_FossilFuelHoldings_a_isempty 6924.769241 44 GE_WeightOfHoldings 5511.747283 111 F_Fossil-FiredUtilities_w_isempty 5159.543110 10 F_CarbonUnderground_w 4672.627456 29 F_Clean200_w 4155.512974 21 F_Fossil-FiredUtilities_w 4075.516177
def plotPredictors(selection, features_scores):
subset_features=feature_scores[feature_scores['Feature_Name'].isin(selection)].sort_values(by='Score', ascending=False)
plt.figure(figsize=(10,5))
plt.bar(range(len(subset_features['Score'])), subset_features['Score'])
plt.xticks(np.arange(0, len(subset_features['Score'])), subset_features['Feature_Name'], rotation="vertical")
#plt.setp(plt.gca().get_xticklabels(), rotation=30, horizontalalignment='right')
plt.tight_layout()
plotPredictors(topk_features['Feature_Name'],feature_scores)
for category in ['FI','FP','F','D','GE','G','W','T','P']:
featurePerCategory=feature_scores[feature_scores['Feature_Name'].str.contains("^"+category+"_.*")]['Feature_Name'].values
plotPredictors(featurePerCategory,feature_scores)
features_simple_model=['F_RelativeCarbonFootprint','F_RelativeCarbonIntensity','F_FossilFuelGrade']
features_grade_model=['F_FossilFuelGrade',
'P_PrisonIndustrialComplexGrade',
'D_DeforestationGrade',
'T_TobaccoGrade',
'W_MilitaryWeaponGrade',
'GE_WeightOfHoldings']
features_intermediate_model=list(feature_scores.nlargest(k,'Score')['Feature_Name'].values)
features_complex_model=clean_df.drop(columns=target).columns
plotPredictors(features_simple_model,feature_scores)
plotPredictors(features_grade_model,feature_scores)
plotPredictors(features_intermediate_model,feature_scores)
plotPredictors(features_complex_model[0:50],feature_scores)
We calculate here the MAE score for each model using Ridge regression with grid search tuning for the regularization (alpha) parameter
Note: Because in linear regression the value of the coefficients is partially determined by the scale of the feature, and in regularized models all coefficients are summed together, we must make sure to standardize the feature prior to training.
def splitTrainTest(df,target,features):
#split current dataframe into train set / test set
# Create X, y
X = df[features]
y = df[target]
# Split into train/test sets
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=test_size_split, random_state=0)
# Standardize data
scaler = StandardScaler()
X_tr_rescaled = scaler.fit_transform(X_tr)
X_te_rescaled = scaler.transform(X_te)
return X_tr_rescaled, X_te_rescaled, y_tr, y_te, scaler
def saveModelResults(model, modelName, X_te_rescaled, y_te):
mae = MAE(y_te, model.predict(X_te_rescaled))
print('MAE with best alpha: {:,.3f}%'.format(mae))
#Save result
details = {
'model' : [modelName],
'test_accuracy' : [mae],
}
df = pd.DataFrame(details)
#df.to_csv('/kaggle/working/results.csv', index=False, mode='a', header=False, float_format='%.3f')
df.to_csv('~/Downloads/results.csv', index=False, mode='a', header=False, float_format='%.3f')
return [mae, model, modelName]
def RidgeModelTraining(df, features, modelName):
X_tr_rescaled, X_te_rescaled, y_tr, y_te, scaler = splitTrainTest(df,target,features)
# Fit/test N models for optimal regularization
gs_results = []
# Grid search
for alpha in np.logspace(-8, 4, num=200):
# Create and fit ridge regression
ridge = Ridge(alpha=alpha)
ridge.fit(X_tr_rescaled, y_tr)
# Save model and its performance on train/test sets
gs_results.append({
'model': ridge,
'alpha': alpha,
'train_mse': MSE(y_tr, ridge.predict(X_tr_rescaled)),
'train_mae': MAE(y_tr, ridge.predict(X_tr_rescaled)),
'test_mse': MSE(y_te, ridge.predict(X_te_rescaled)),
'test_mae': MAE(y_te, ridge.predict(X_te_rescaled)),
})
# Convert results to DataFrame
gs_results = pd.DataFrame(gs_results)
# Plot the validation curves
plt.plot(np.log10(gs_results['alpha']), gs_results['train_mae'], label='train curve')
plt.plot(np.log10(gs_results['alpha']), gs_results['test_mae'], label='test curve')
# Mark best alpha value
best_result = gs_results.loc[gs_results.test_mae.idxmin()]
plt.scatter(np.log10(best_result.alpha), best_result.test_mae, marker='x', c='red', zorder=10)
plt.title('Best alpha: {:.1e} - mse: {:.4f} mae: {:,.0f}%'.format(
best_result.alpha, best_result.test_mse, best_result.test_mae))
plt.xlabel('$log_{10}(alpha)$')
plt.ylabel('MAE')
plt.legend()
plt.show()
ridge = Ridge(alpha=best_result.alpha)
ridge.fit(X_tr_rescaled, y_tr)
#mae_best=MAE(y_te, ridge.predict(X_te_rescaled))
#print('MAE with best alpha: {:,.2f}$'.format(mae_best))
#return [mae_best, ridge]
return saveModelResults(ridge, modelName, X_te_rescaled, y_te)
#MAE baseline
X_tr_rescaled, X_te_rescaled, y_tr, y_te, scaler = splitTrainTest(clean_df,target,features_simple_model)
median_predictions = np.full_like(y_te, np.median(y_tr))
mae_baseline=MAE(y_te, median_predictions)
print('Median baseline: {:,.2f}%'.format(mae_baseline))
Median baseline: 14.47%
ridge_simple = RidgeModelTraining(clean_df, features_simple_model, 'RidgeSimple')
MAE with best alpha: 12.902%
ridge_grade = RidgeModelTraining(clean_df, features_grade_model, 'RidgeGrade')
MAE with best alpha: 12.294%
ridge_intermediate = RidgeModelTraining(clean_df, features_intermediate_model, 'RidgeIntermediate')
MAE with best alpha: 9.786%
ridge_complex = RidgeModelTraining(clean_df, features_complex_model, 'RidgeComplex')
MAE with best alpha: 8.725%
# Ridge comparison
mae_values = [mae_baseline, ridge_simple[0], ridge_grade[0] , ridge_intermediate[0], ridge_complex[0]]
titles = ['median', 'Simple', 'Grade','Intermediate', 'Complex']
xcor = np.arange(len(mae_values))
plt.bar(xcor, mae_values)
plt.xticks(xcor, titles)
plt.ylabel('MAE')
plt.show()
selected_model=features_simple_model
X_tr_rescaled, X_te_rescaled, y_tr, y_te, scaler = splitTrainTest(clean_df,target,selected_model)
#!pip install graphviz
!conda install -c conda-forge pydotplus -y
!conda install -c conda-forge python-graphviz -y
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: C:\Users\Thinkpad\anaconda3
added / updated specs:
- pydotplus
The following packages will be downloaded:
package | build
---------------------------|-----------------
pydotplus-2.0.2 | pyhaef67bd_5 24 KB conda-forge
------------------------------------------------------------
Total: 24 KB
The following NEW packages will be INSTALLED:
pydotplus conda-forge/noarch::pydotplus-2.0.2-pyhaef67bd_5
Downloading and Extracting Packages
pydotplus-2.0.2 | 24 KB | | 0%
pydotplus-2.0.2 | 24 KB | ######5 | 66%
pydotplus-2.0.2 | 24 KB | ########## | 100%
pydotplus-2.0.2 | 24 KB | ########## | 100%
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: C:\Users\Thinkpad\anaconda3
added / updated specs:
- python-graphviz
The following packages will be downloaded:
package | build
---------------------------|-----------------
python-graphviz-0.20.1 | pyh22cad53_0 35 KB conda-forge
------------------------------------------------------------
Total: 35 KB
The following packages will be UPDATED:
python-graphviz pkgs/main::python-graphviz-0.16-pyhd3~ --> conda-forge::python-graphviz-0.20.1-pyh22cad53_0
Downloading and Extracting Packages
python-graphviz-0.20 | 35 KB | | 0%
python-graphviz-0.20 | 35 KB | ####5 | 45%
python-graphviz-0.20 | 35 KB | ########## | 100%
python-graphviz-0.20 | 35 KB | ########## | 100%
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
n_estimators=100
max_depth=4
# Random Forest Regressor Model
rdForest = RandomForestRegressor(max_depth=max_depth,n_estimators=n_estimators, random_state=0)
model = rdForest.fit(X_tr_rescaled, y_tr)
#Show plot
tree = rdForest.estimators_[n_estimators-1]
# Export decision tree
#dot_data = export_graphviz(
# tree, out_file=None,
# feature_names=clean_df[selected_model].columns,
# class_names=categories,
#filled=True, rounded=True
dot_data = export_graphviz(
tree, out_file='tree.dot',
feature_names=clean_df[selected_model].columns,
class_names=categories,
filled=True, rounded=True)
from subprocess import call
call(['dot', '-Tpng', 'tree.dot', '-o', 'tree.png', '-Gdpi=600'])
# Display in jupyter notebook
from IPython.display import Image
Image(filename = 'tree.png')
# Display decision tree
#graph = graphviz.Source(dot_data)
#graph
n_estimators=500
max_depth=None
max_features="log2"
rdForest = RandomForestRegressor(max_features=max_features, max_depth=max_depth,n_estimators=n_estimators,random_state=0)
model = rdForest.fit(X_tr_rescaled, y_tr)
rdForestResults=saveModelResults(model, "RandomForest", X_te_rescaled, y_te)
MAE with best alpha: 3.575%
n_neighbors=100
p=2
weights='distance'
neigh = KNeighborsRegressor(n_neighbors=n_neighbors, p=p, weights=weights)
neigh.fit(X_tr_rescaled, y_tr)
kNNResults=saveModelResults(neigh, "KNN", X_te_rescaled, y_te)
MAE with best alpha: 2.736%
We have defined here a neural network with the following properties:
batch_size_nb=32
epochs=200
number_of_neurons=128
number_of_hidden_layers=10
NN_model = Sequential()
# The Input Layer :
NN_model.add(Dense(number_of_neurons, kernel_initializer='normal',input_dim = X_tr_rescaled.shape[1], activation='relu'))
# The Hidden Layers :
for i in range(0,number_of_hidden_layers):
NN_model.add(Dense(number_of_neurons, kernel_initializer='normal',activation='relu'))
# The Output Layer :
NN_model.add(Dense(1, kernel_initializer='normal',activation='linear'))
# Compile the network :
NN_model.compile(loss='mean_absolute_error', optimizer='adam', metrics=['mean_absolute_error'])
NN_model.summary()
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
dense (Dense) (None, 128) 512
dense_1 (Dense) (None, 128) 16512
dense_2 (Dense) (None, 128) 16512
dense_3 (Dense) (None, 128) 16512
dense_4 (Dense) (None, 128) 16512
dense_5 (Dense) (None, 128) 16512
dense_6 (Dense) (None, 128) 16512
dense_7 (Dense) (None, 128) 16512
dense_8 (Dense) (None, 128) 16512
dense_9 (Dense) (None, 128) 16512
dense_10 (Dense) (None, 128) 16512
dense_11 (Dense) (None, 1) 129
=================================================================
Total params: 165,761
Trainable params: 165,761
Non-trainable params: 0
_________________________________________________________________
#modelfilepath='/kaggle/input/fossil-free-funds/misc/modelNN_simple'
modelfilepath='~/Downloads/modelNN_simple'
if not os.path.isfile(modelfilepath):
#os.makedirs(modelfilepath)
#Define a checkpoint
#checkpoint_name = traindir+'/Weights-{epoch:03d}--{val_loss:.5f}.hdf5'
#checkpoint = ModelCheckpoint(checkpoint_name, monitor='val_loss', verbose = 1, save_best_only = True, mode ='auto')
#callbacks_list = [checkpoint]
#Train model
NN_model.fit(X_tr_rescaled, y_tr, epochs=epochs, batch_size=batch_size_nb, validation_split = 0.2)#, callbacks=callbacks_list)
NN_model.save(modelfilepath)
else:
NN_model=tf.keras.models.load_model(modelfilepath)
Epoch 1/200 1406/1406 [==============================] - 11s 7ms/step - loss: 12.5523 - mean_absolute_error: 12.5523 - val_loss: 12.1573 - val_mean_absolute_error: 12.1573 Epoch 2/200 1406/1406 [==============================] - 8s 6ms/step - loss: 12.2448 - mean_absolute_error: 12.2448 - val_loss: 12.1134 - val_mean_absolute_error: 12.1134 Epoch 3/200 1406/1406 [==============================] - 8s 5ms/step - loss: 12.1028 - mean_absolute_error: 12.1028 - val_loss: 12.1154 - val_mean_absolute_error: 12.1154 Epoch 4/200 1406/1406 [==============================] - 8s 6ms/step - loss: 12.1127 - mean_absolute_error: 12.1127 - val_loss: 12.0268 - val_mean_absolute_error: 12.0268 Epoch 5/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.9730 - mean_absolute_error: 11.9730 - val_loss: 11.9056 - val_mean_absolute_error: 11.9056 Epoch 6/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.9128 - mean_absolute_error: 11.9128 - val_loss: 11.8593 - val_mean_absolute_error: 11.8593 Epoch 7/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.8825 - mean_absolute_error: 11.8825 - val_loss: 11.9065 - val_mean_absolute_error: 11.9065 Epoch 8/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.8744 - mean_absolute_error: 11.8744 - val_loss: 12.2177 - val_mean_absolute_error: 12.2177 Epoch 9/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.8413 - mean_absolute_error: 11.8413 - val_loss: 11.9494 - val_mean_absolute_error: 11.9494 Epoch 10/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.8141 - mean_absolute_error: 11.8141 - val_loss: 11.8083 - val_mean_absolute_error: 11.8083 Epoch 11/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.7950 - mean_absolute_error: 11.7950 - val_loss: 11.9567 - val_mean_absolute_error: 11.9567 Epoch 12/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.7963 - mean_absolute_error: 11.7963 - val_loss: 12.2288 - val_mean_absolute_error: 12.2288 Epoch 13/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.7309 - mean_absolute_error: 11.7309 - val_loss: 11.7896 - val_mean_absolute_error: 11.7896 Epoch 14/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.7419 - mean_absolute_error: 11.7419 - val_loss: 11.7743 - val_mean_absolute_error: 11.7743 Epoch 15/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.7180 - mean_absolute_error: 11.7180 - val_loss: 11.7752 - val_mean_absolute_error: 11.7752 Epoch 16/200 1406/1406 [==============================] - 9s 7ms/step - loss: 11.7085 - mean_absolute_error: 11.7085 - val_loss: 11.8242 - val_mean_absolute_error: 11.8242 Epoch 17/200 1406/1406 [==============================] - 9s 6ms/step - loss: 11.6745 - mean_absolute_error: 11.6745 - val_loss: 11.8153 - val_mean_absolute_error: 11.8153 Epoch 18/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.6646 - mean_absolute_error: 11.6646 - val_loss: 11.7472 - val_mean_absolute_error: 11.7472 Epoch 19/200 1406/1406 [==============================] - 9s 6ms/step - loss: 11.6610 - mean_absolute_error: 11.6610 - val_loss: 11.8326 - val_mean_absolute_error: 11.8326 Epoch 20/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.6618 - mean_absolute_error: 11.6618 - val_loss: 11.7480 - val_mean_absolute_error: 11.7480 Epoch 21/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.6329 - mean_absolute_error: 11.6329 - val_loss: 11.7014 - val_mean_absolute_error: 11.7014 Epoch 22/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.6220 - mean_absolute_error: 11.6220 - val_loss: 11.6623 - val_mean_absolute_error: 11.6623 Epoch 23/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.6092 - mean_absolute_error: 11.6092 - val_loss: 11.6771 - val_mean_absolute_error: 11.6771 Epoch 24/200 1406/1406 [==============================] - 9s 6ms/step - loss: 11.6103 - mean_absolute_error: 11.6103 - val_loss: 11.7225 - val_mean_absolute_error: 11.7225 Epoch 25/200 1406/1406 [==============================] - 8s 5ms/step - loss: 11.5746 - mean_absolute_error: 11.5746 - val_loss: 11.6394 - val_mean_absolute_error: 11.6394 Epoch 26/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5713 - mean_absolute_error: 11.5713 - val_loss: 11.7205 - val_mean_absolute_error: 11.7205 Epoch 27/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5659 - mean_absolute_error: 11.5659 - val_loss: 11.6325 - val_mean_absolute_error: 11.6325 Epoch 28/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5430 - mean_absolute_error: 11.5430 - val_loss: 11.6734 - val_mean_absolute_error: 11.6734 Epoch 29/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5478 - mean_absolute_error: 11.5478 - val_loss: 11.7951 - val_mean_absolute_error: 11.7951 Epoch 30/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5342 - mean_absolute_error: 11.5342 - val_loss: 11.7362 - val_mean_absolute_error: 11.7362 Epoch 31/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5170 - mean_absolute_error: 11.5170 - val_loss: 11.6274 - val_mean_absolute_error: 11.6274 Epoch 32/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5033 - mean_absolute_error: 11.5033 - val_loss: 11.7722 - val_mean_absolute_error: 11.7722 Epoch 33/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.5014 - mean_absolute_error: 11.5014 - val_loss: 11.5808 - val_mean_absolute_error: 11.5808 Epoch 34/200 1406/1406 [==============================] - 8s 5ms/step - loss: 11.4762 - mean_absolute_error: 11.4762 - val_loss: 11.5619 - val_mean_absolute_error: 11.5619 Epoch 35/200 1406/1406 [==============================] - 8s 5ms/step - loss: 11.4668 - mean_absolute_error: 11.4668 - val_loss: 11.6671 - val_mean_absolute_error: 11.6671 Epoch 36/200 1406/1406 [==============================] - 8s 5ms/step - loss: 11.4748 - mean_absolute_error: 11.4748 - val_loss: 11.5767 - val_mean_absolute_error: 11.5767 Epoch 37/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.4674 - mean_absolute_error: 11.4674 - val_loss: 11.5793 - val_mean_absolute_error: 11.5793 Epoch 38/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.4524 - mean_absolute_error: 11.4524 - val_loss: 11.5656 - val_mean_absolute_error: 11.5656 Epoch 39/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.4353 - mean_absolute_error: 11.4353 - val_loss: 11.6059 - val_mean_absolute_error: 11.6059 Epoch 40/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.4434 - mean_absolute_error: 11.4434 - val_loss: 11.7112 - val_mean_absolute_error: 11.7112 Epoch 41/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.4323 - mean_absolute_error: 11.4323 - val_loss: 11.7465 - val_mean_absolute_error: 11.7465 Epoch 42/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.4201 - mean_absolute_error: 11.4201 - val_loss: 11.5376 - val_mean_absolute_error: 11.5376 Epoch 43/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3771 - mean_absolute_error: 11.3771 - val_loss: 11.7029 - val_mean_absolute_error: 11.7029 Epoch 44/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3755 - mean_absolute_error: 11.3755 - val_loss: 11.5913 - val_mean_absolute_error: 11.5913 Epoch 45/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3883 - mean_absolute_error: 11.3883 - val_loss: 11.5745 - val_mean_absolute_error: 11.5745 Epoch 46/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3873 - mean_absolute_error: 11.3873 - val_loss: 11.6407 - val_mean_absolute_error: 11.6407 Epoch 47/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3731 - mean_absolute_error: 11.3731 - val_loss: 11.5478 - val_mean_absolute_error: 11.5478 Epoch 48/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3549 - mean_absolute_error: 11.3549 - val_loss: 11.5190 - val_mean_absolute_error: 11.5190 Epoch 49/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3520 - mean_absolute_error: 11.3520 - val_loss: 11.5101 - val_mean_absolute_error: 11.5101 Epoch 50/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3372 - mean_absolute_error: 11.3372 - val_loss: 11.6136 - val_mean_absolute_error: 11.6136 Epoch 51/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3475 - mean_absolute_error: 11.3475 - val_loss: 11.4996 - val_mean_absolute_error: 11.4996 Epoch 52/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3136 - mean_absolute_error: 11.3136 - val_loss: 11.5020 - val_mean_absolute_error: 11.5020 Epoch 53/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.3340 - mean_absolute_error: 11.3340 - val_loss: 11.4398 - val_mean_absolute_error: 11.4398 Epoch 54/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2841 - mean_absolute_error: 11.2841 - val_loss: 11.4654 - val_mean_absolute_error: 11.4654 Epoch 55/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2720 - mean_absolute_error: 11.2720 - val_loss: 11.4551 - val_mean_absolute_error: 11.4551 Epoch 56/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2769 - mean_absolute_error: 11.2769 - val_loss: 11.4412 - val_mean_absolute_error: 11.4412 Epoch 57/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2768 - mean_absolute_error: 11.2768 - val_loss: 11.5672 - val_mean_absolute_error: 11.5672 Epoch 58/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2655 - mean_absolute_error: 11.2655 - val_loss: 11.4601 - val_mean_absolute_error: 11.4601 Epoch 59/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2428 - mean_absolute_error: 11.2428 - val_loss: 11.5019 - val_mean_absolute_error: 11.5019 Epoch 60/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2719 - mean_absolute_error: 11.2719 - val_loss: 11.4812 - val_mean_absolute_error: 11.4812 Epoch 61/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2341 - mean_absolute_error: 11.2341 - val_loss: 11.3926 - val_mean_absolute_error: 11.3926 Epoch 62/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2306 - mean_absolute_error: 11.2306 - val_loss: 11.3489 - val_mean_absolute_error: 11.3489 Epoch 63/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2192 - mean_absolute_error: 11.2192 - val_loss: 11.5317 - val_mean_absolute_error: 11.5317 Epoch 64/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2167 - mean_absolute_error: 11.2167 - val_loss: 11.4707 - val_mean_absolute_error: 11.4707 Epoch 65/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2060 - mean_absolute_error: 11.2060 - val_loss: 11.4769 - val_mean_absolute_error: 11.4769 Epoch 66/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.2049 - mean_absolute_error: 11.2049 - val_loss: 11.4913 - val_mean_absolute_error: 11.4913 Epoch 67/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1992 - mean_absolute_error: 11.1992 - val_loss: 11.4304 - val_mean_absolute_error: 11.4304 Epoch 68/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1726 - mean_absolute_error: 11.1726 - val_loss: 11.3996 - val_mean_absolute_error: 11.3996 Epoch 69/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1659 - mean_absolute_error: 11.1659 - val_loss: 11.3460 - val_mean_absolute_error: 11.3460 Epoch 70/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1733 - mean_absolute_error: 11.1733 - val_loss: 11.3888 - val_mean_absolute_error: 11.3888 Epoch 71/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1364 - mean_absolute_error: 11.1364 - val_loss: 11.3085 - val_mean_absolute_error: 11.3085 Epoch 72/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1288 - mean_absolute_error: 11.1288 - val_loss: 11.2962 - val_mean_absolute_error: 11.2962 Epoch 73/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1245 - mean_absolute_error: 11.1245 - val_loss: 11.3863 - val_mean_absolute_error: 11.3863 Epoch 74/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1122 - mean_absolute_error: 11.1122 - val_loss: 11.4093 - val_mean_absolute_error: 11.4093 Epoch 75/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1106 - mean_absolute_error: 11.1106 - val_loss: 11.3445 - val_mean_absolute_error: 11.3445 Epoch 76/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1425 - mean_absolute_error: 11.1425 - val_loss: 11.4930 - val_mean_absolute_error: 11.4930 Epoch 77/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0860 - mean_absolute_error: 11.0860 - val_loss: 11.3358 - val_mean_absolute_error: 11.3358 Epoch 78/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.1073 - mean_absolute_error: 11.1073 - val_loss: 11.3623 - val_mean_absolute_error: 11.3623 Epoch 79/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0682 - mean_absolute_error: 11.0682 - val_loss: 11.3249 - val_mean_absolute_error: 11.3249 Epoch 80/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0541 - mean_absolute_error: 11.0541 - val_loss: 11.2813 - val_mean_absolute_error: 11.2813 Epoch 81/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0676 - mean_absolute_error: 11.0676 - val_loss: 11.2694 - val_mean_absolute_error: 11.2694 Epoch 82/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0487 - mean_absolute_error: 11.0487 - val_loss: 11.3567 - val_mean_absolute_error: 11.3567 Epoch 83/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0351 - mean_absolute_error: 11.0351 - val_loss: 11.2471 - val_mean_absolute_error: 11.2471 Epoch 84/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0492 - mean_absolute_error: 11.0492 - val_loss: 11.2248 - val_mean_absolute_error: 11.2248 Epoch 85/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0250 - mean_absolute_error: 11.0250 - val_loss: 11.4393 - val_mean_absolute_error: 11.4393 Epoch 86/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0391 - mean_absolute_error: 11.0391 - val_loss: 11.2733 - val_mean_absolute_error: 11.2733 Epoch 87/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0214 - mean_absolute_error: 11.0214 - val_loss: 11.2515 - val_mean_absolute_error: 11.2515 Epoch 88/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9983 - mean_absolute_error: 10.9983 - val_loss: 11.3370 - val_mean_absolute_error: 11.3370 Epoch 89/200 1406/1406 [==============================] - 8s 6ms/step - loss: 11.0331 - mean_absolute_error: 11.0331 - val_loss: 11.2489 - val_mean_absolute_error: 11.2489 Epoch 90/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9932 - mean_absolute_error: 10.9932 - val_loss: 11.4068 - val_mean_absolute_error: 11.4068 Epoch 91/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9924 - mean_absolute_error: 10.9924 - val_loss: 11.2651 - val_mean_absolute_error: 11.2651 Epoch 92/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9707 - mean_absolute_error: 10.9707 - val_loss: 11.2578 - val_mean_absolute_error: 11.2578 Epoch 93/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9494 - mean_absolute_error: 10.9494 - val_loss: 11.3770 - val_mean_absolute_error: 11.3770 Epoch 94/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9662 - mean_absolute_error: 10.9662 - val_loss: 11.2451 - val_mean_absolute_error: 11.2451 Epoch 95/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9342 - mean_absolute_error: 10.9342 - val_loss: 11.2885 - val_mean_absolute_error: 11.2885 Epoch 96/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.9379 - mean_absolute_error: 10.9379 - val_loss: 11.3038 - val_mean_absolute_error: 11.3038 Epoch 97/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9536 - mean_absolute_error: 10.9536 - val_loss: 11.1708 - val_mean_absolute_error: 11.1708 Epoch 98/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.8944 - mean_absolute_error: 10.8944 - val_loss: 11.1921 - val_mean_absolute_error: 11.1921 Epoch 99/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9209 - mean_absolute_error: 10.9209 - val_loss: 11.2091 - val_mean_absolute_error: 11.2091 Epoch 100/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9387 - mean_absolute_error: 10.9387 - val_loss: 11.2708 - val_mean_absolute_error: 11.2708 Epoch 101/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8870 - mean_absolute_error: 10.8870 - val_loss: 11.1279 - val_mean_absolute_error: 11.1279 Epoch 102/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9272 - mean_absolute_error: 10.9272 - val_loss: 11.2265 - val_mean_absolute_error: 11.2265 Epoch 103/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9336 - mean_absolute_error: 10.9336 - val_loss: 11.3489 - val_mean_absolute_error: 11.3489 Epoch 104/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.9679 - mean_absolute_error: 10.9679 - val_loss: 11.1775 - val_mean_absolute_error: 11.1775 Epoch 105/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8766 - mean_absolute_error: 10.8766 - val_loss: 11.2196 - val_mean_absolute_error: 11.2196 Epoch 106/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8957 - mean_absolute_error: 10.8957 - val_loss: 11.0860 - val_mean_absolute_error: 11.0860 Epoch 107/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8809 - mean_absolute_error: 10.8809 - val_loss: 11.0961 - val_mean_absolute_error: 11.0961 Epoch 108/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8613 - mean_absolute_error: 10.8613 - val_loss: 11.1044 - val_mean_absolute_error: 11.1044 Epoch 109/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8629 - mean_absolute_error: 10.8629 - val_loss: 11.1160 - val_mean_absolute_error: 11.1160 Epoch 110/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8760 - mean_absolute_error: 10.8760 - val_loss: 11.1220 - val_mean_absolute_error: 11.1220 Epoch 111/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8506 - mean_absolute_error: 10.8506 - val_loss: 11.0723 - val_mean_absolute_error: 11.0723 Epoch 112/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8508 - mean_absolute_error: 10.8508 - val_loss: 11.1861 - val_mean_absolute_error: 11.1861 Epoch 113/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8185 - mean_absolute_error: 10.8185 - val_loss: 11.1952 - val_mean_absolute_error: 11.1952 Epoch 114/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7908 - mean_absolute_error: 10.7908 - val_loss: 11.0480 - val_mean_absolute_error: 11.0480 Epoch 115/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8114 - mean_absolute_error: 10.8114 - val_loss: 11.1036 - val_mean_absolute_error: 11.1036 Epoch 116/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8353 - mean_absolute_error: 10.8353 - val_loss: 11.0676 - val_mean_absolute_error: 11.0676 Epoch 117/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8087 - mean_absolute_error: 10.8087 - val_loss: 11.0682 - val_mean_absolute_error: 11.0682 Epoch 118/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8210 - mean_absolute_error: 10.8210 - val_loss: 11.0965 - val_mean_absolute_error: 11.0965 Epoch 119/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7743 - mean_absolute_error: 10.7743 - val_loss: 11.1158 - val_mean_absolute_error: 11.1158 Epoch 120/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7975 - mean_absolute_error: 10.7975 - val_loss: 11.0777 - val_mean_absolute_error: 11.0777 Epoch 121/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7792 - mean_absolute_error: 10.7792 - val_loss: 11.1243 - val_mean_absolute_error: 11.1243 Epoch 122/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7798 - mean_absolute_error: 10.7798 - val_loss: 11.1234 - val_mean_absolute_error: 11.1234 Epoch 123/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7353 - mean_absolute_error: 10.7353 - val_loss: 11.1417 - val_mean_absolute_error: 11.1417 Epoch 124/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7783 - mean_absolute_error: 10.7783 - val_loss: 11.0466 - val_mean_absolute_error: 11.0466 Epoch 125/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7448 - mean_absolute_error: 10.7448 - val_loss: 11.0344 - val_mean_absolute_error: 11.0344 Epoch 126/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.8028 - mean_absolute_error: 10.8028 - val_loss: 10.9951 - val_mean_absolute_error: 10.9951 Epoch 127/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7272 - mean_absolute_error: 10.7272 - val_loss: 11.0368 - val_mean_absolute_error: 11.0368 Epoch 128/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7118 - mean_absolute_error: 10.7118 - val_loss: 11.0557 - val_mean_absolute_error: 11.0557 Epoch 129/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7478 - mean_absolute_error: 10.7478 - val_loss: 11.1890 - val_mean_absolute_error: 11.1890 Epoch 130/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7034 - mean_absolute_error: 10.7034 - val_loss: 10.9691 - val_mean_absolute_error: 10.9691 Epoch 131/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7110 - mean_absolute_error: 10.7110 - val_loss: 11.0789 - val_mean_absolute_error: 11.0789 Epoch 132/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7289 - mean_absolute_error: 10.7289 - val_loss: 11.0096 - val_mean_absolute_error: 11.0096 Epoch 133/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6679 - mean_absolute_error: 10.6679 - val_loss: 11.2575 - val_mean_absolute_error: 11.2575 Epoch 134/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7077 - mean_absolute_error: 10.7077 - val_loss: 11.0674 - val_mean_absolute_error: 11.0674 Epoch 135/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6724 - mean_absolute_error: 10.6724 - val_loss: 10.9588 - val_mean_absolute_error: 10.9588 Epoch 136/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7142 - mean_absolute_error: 10.7142 - val_loss: 11.0576 - val_mean_absolute_error: 11.0576 Epoch 137/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7351 - mean_absolute_error: 10.7351 - val_loss: 11.0447 - val_mean_absolute_error: 11.0447 Epoch 138/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6842 - mean_absolute_error: 10.6842 - val_loss: 11.0011 - val_mean_absolute_error: 11.0011 Epoch 139/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6957 - mean_absolute_error: 10.6957 - val_loss: 10.9778 - val_mean_absolute_error: 10.9778 Epoch 140/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7435 - mean_absolute_error: 10.7435 - val_loss: 10.9378 - val_mean_absolute_error: 10.9378 Epoch 141/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7030 - mean_absolute_error: 10.7030 - val_loss: 11.2268 - val_mean_absolute_error: 11.2268 Epoch 142/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.7005 - mean_absolute_error: 10.7005 - val_loss: 11.1963 - val_mean_absolute_error: 11.1963 Epoch 143/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.6815 - mean_absolute_error: 10.6815 - val_loss: 11.1122 - val_mean_absolute_error: 11.1122 Epoch 144/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.6870 - mean_absolute_error: 10.6870 - val_loss: 10.9718 - val_mean_absolute_error: 10.9718 Epoch 145/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6097 - mean_absolute_error: 10.6097 - val_loss: 10.9739 - val_mean_absolute_error: 10.9739 Epoch 146/200 1406/1406 [==============================] - 9s 6ms/step - loss: 10.6669 - mean_absolute_error: 10.6669 - val_loss: 10.8989 - val_mean_absolute_error: 10.8989 Epoch 147/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6635 - mean_absolute_error: 10.6635 - val_loss: 10.9441 - val_mean_absolute_error: 10.9441 Epoch 148/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.6121 - mean_absolute_error: 10.6121 - val_loss: 11.0201 - val_mean_absolute_error: 11.0201 Epoch 149/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6021 - mean_absolute_error: 10.6021 - val_loss: 11.2181 - val_mean_absolute_error: 11.2181 Epoch 150/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6268 - mean_absolute_error: 10.6268 - val_loss: 10.9335 - val_mean_absolute_error: 10.9335 Epoch 151/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5951 - mean_absolute_error: 10.5951 - val_loss: 10.9417 - val_mean_absolute_error: 10.9417 Epoch 152/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.6332 - mean_absolute_error: 10.6332 - val_loss: 10.8761 - val_mean_absolute_error: 10.8761 Epoch 153/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6347 - mean_absolute_error: 10.6347 - val_loss: 10.9461 - val_mean_absolute_error: 10.9461 Epoch 154/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6645 - mean_absolute_error: 10.6645 - val_loss: 10.9037 - val_mean_absolute_error: 10.9037 Epoch 155/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6512 - mean_absolute_error: 10.6512 - val_loss: 11.0101 - val_mean_absolute_error: 11.0101 Epoch 156/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6876 - mean_absolute_error: 10.6876 - val_loss: 11.1526 - val_mean_absolute_error: 11.1526 Epoch 157/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.6236 - mean_absolute_error: 10.6236 - val_loss: 11.1192 - val_mean_absolute_error: 11.1192 Epoch 158/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6171 - mean_absolute_error: 10.6171 - val_loss: 10.9392 - val_mean_absolute_error: 10.9392 Epoch 159/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5932 - mean_absolute_error: 10.5932 - val_loss: 10.9217 - val_mean_absolute_error: 10.9217 Epoch 160/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.5809 - mean_absolute_error: 10.5809 - val_loss: 10.9272 - val_mean_absolute_error: 10.9272 Epoch 161/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5814 - mean_absolute_error: 10.5814 - val_loss: 10.9680 - val_mean_absolute_error: 10.9680 Epoch 162/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5312 - mean_absolute_error: 10.5312 - val_loss: 10.9397 - val_mean_absolute_error: 10.9397 Epoch 163/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6057 - mean_absolute_error: 10.6057 - val_loss: 10.9268 - val_mean_absolute_error: 10.9268 Epoch 164/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5842 - mean_absolute_error: 10.5842 - val_loss: 10.9151 - val_mean_absolute_error: 10.9151 Epoch 165/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5580 - mean_absolute_error: 10.5580 - val_loss: 11.0386 - val_mean_absolute_error: 11.0386 Epoch 166/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5624 - mean_absolute_error: 10.5624 - val_loss: 10.8964 - val_mean_absolute_error: 10.8964 Epoch 167/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5754 - mean_absolute_error: 10.5754 - val_loss: 10.9333 - val_mean_absolute_error: 10.9333 Epoch 168/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5973 - mean_absolute_error: 10.5973 - val_loss: 10.9277 - val_mean_absolute_error: 10.9277 Epoch 169/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5140 - mean_absolute_error: 10.5140 - val_loss: 10.9670 - val_mean_absolute_error: 10.9670 Epoch 170/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.6137 - mean_absolute_error: 10.6137 - val_loss: 10.9930 - val_mean_absolute_error: 10.9930 Epoch 171/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5671 - mean_absolute_error: 10.5671 - val_loss: 10.9324 - val_mean_absolute_error: 10.9324 Epoch 172/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5800 - mean_absolute_error: 10.5800 - val_loss: 10.9613 - val_mean_absolute_error: 10.9613 Epoch 173/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5803 - mean_absolute_error: 10.5803 - val_loss: 10.9015 - val_mean_absolute_error: 10.9015 Epoch 174/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5425 - mean_absolute_error: 10.5425 - val_loss: 10.9080 - val_mean_absolute_error: 10.9080 Epoch 175/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4803 - mean_absolute_error: 10.4803 - val_loss: 10.8126 - val_mean_absolute_error: 10.8126 Epoch 176/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4779 - mean_absolute_error: 10.4779 - val_loss: 10.8544 - val_mean_absolute_error: 10.8544 Epoch 177/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4898 - mean_absolute_error: 10.4898 - val_loss: 10.8078 - val_mean_absolute_error: 10.8078 Epoch 178/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.4772 - mean_absolute_error: 10.4772 - val_loss: 10.8119 - val_mean_absolute_error: 10.8119 Epoch 179/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4970 - mean_absolute_error: 10.4970 - val_loss: 10.9023 - val_mean_absolute_error: 10.9023 Epoch 180/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4403 - mean_absolute_error: 10.4403 - val_loss: 10.8432 - val_mean_absolute_error: 10.8432 Epoch 181/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5327 - mean_absolute_error: 10.5327 - val_loss: 10.9012 - val_mean_absolute_error: 10.9012 Epoch 182/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5865 - mean_absolute_error: 10.5865 - val_loss: 10.9854 - val_mean_absolute_error: 10.9854 Epoch 183/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5605 - mean_absolute_error: 10.5605 - val_loss: 10.8183 - val_mean_absolute_error: 10.8183 Epoch 184/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5002 - mean_absolute_error: 10.5002 - val_loss: 10.9037 - val_mean_absolute_error: 10.9037 Epoch 185/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5314 - mean_absolute_error: 10.5314 - val_loss: 11.0398 - val_mean_absolute_error: 11.0398 Epoch 186/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5539 - mean_absolute_error: 10.5539 - val_loss: 10.9463 - val_mean_absolute_error: 10.9463 Epoch 187/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5417 - mean_absolute_error: 10.5417 - val_loss: 10.9236 - val_mean_absolute_error: 10.9236 Epoch 188/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.5022 - mean_absolute_error: 10.5022 - val_loss: 10.9964 - val_mean_absolute_error: 10.9964 Epoch 189/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4623 - mean_absolute_error: 10.4623 - val_loss: 10.7402 - val_mean_absolute_error: 10.7402 Epoch 190/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.4546 - mean_absolute_error: 10.4546 - val_loss: 10.9029 - val_mean_absolute_error: 10.9029 Epoch 191/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.5100 - mean_absolute_error: 10.5100 - val_loss: 11.1152 - val_mean_absolute_error: 11.1152 Epoch 192/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4289 - mean_absolute_error: 10.4289 - val_loss: 10.7361 - val_mean_absolute_error: 10.7361 Epoch 193/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.4073 - mean_absolute_error: 10.4073 - val_loss: 10.8532 - val_mean_absolute_error: 10.8532 Epoch 194/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.5379 - mean_absolute_error: 10.5379 - val_loss: 10.8736 - val_mean_absolute_error: 10.8736 Epoch 195/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.4667 - mean_absolute_error: 10.4667 - val_loss: 10.8371 - val_mean_absolute_error: 10.8371 Epoch 196/200 1406/1406 [==============================] - 8s 5ms/step - loss: 10.4191 - mean_absolute_error: 10.4191 - val_loss: 10.7960 - val_mean_absolute_error: 10.7960 Epoch 197/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4316 - mean_absolute_error: 10.4316 - val_loss: 10.8880 - val_mean_absolute_error: 10.8880 Epoch 198/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4118 - mean_absolute_error: 10.4118 - val_loss: 10.8271 - val_mean_absolute_error: 10.8271 Epoch 199/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.3995 - mean_absolute_error: 10.3995 - val_loss: 10.8561 - val_mean_absolute_error: 10.8561 Epoch 200/200 1406/1406 [==============================] - 8s 6ms/step - loss: 10.4406 - mean_absolute_error: 10.4406 - val_loss: 10.7948 - val_mean_absolute_error: 10.7948 INFO:tensorflow:Assets written to: ~/Downloads/modelNN_simple\assets
NN_model.compile(loss='mean_absolute_error', optimizer='adam', metrics=['mean_absolute_error'])
NNResults=saveModelResults(NN_model, "NN", X_te_rescaled, y_te)
1172/1172 [==============================] - 3s 3ms/step MAE with best alpha: 10.741%
def rand_jitter(arr, delta, feature_name):
if not feature_name in continuous:
return arr + delta
else:
return arr
allModels=[kNNResults, rdForestResults, NNResults, ridge_simple ]
for i in range(0, len(selected_model)):
plt.figure(figsize=(12,8))
plt.title('ML comparison for '+selected_model[i])
plt.xlabel(selected_model[i])
plt.ylabel(target)
x = scaler.inverse_transform(X_te_rescaled)[:,i]
#plt.scatter(rand_jitter(x, 0, selected_model[i]), y_te, label="Test set", alpha=.5)
sns.violinplot(y=rand_jitter(x, 0, selected_model[i]), x=y_te)
# for idx,model in enumerate(allModels):
# delta = (idx+1)/(len(allModels)*4)
# plt.scatter(rand_jitter(x, delta, selected_model[i]), model[1].predict(X_te_rescaled), label=model[2],alpha=.5)
# plt.legend()
plt.show()
# Final comparison
mae_values = [mae_baseline, ridge_simple[0], NNResults[0], rdForestResults[0], kNNResults[0]]
titles = ['Median', 'Ridge','NN', 'RFR', 'kNN']
xcor = np.arange(len(mae_values))
plt.bar(xcor, mae_values)
plt.xticks(xcor, titles)
plt.ylabel('MAE')
plt.show()
def grid_search(X_tr_rescaled, y_tr, X_te_rescaled, y_te):
gs_results=[]
pipeline1 = Pipeline((
('rfr', RandomForestRegressor()),
))
pipeline2 = Pipeline((
('knn', KNeighborsRegressor()),
))
parameters1 = {
'rfr__n_estimators': [5, 10, 15, 20, 50, 100, 200, 500], #np.arange(5,105,5).tolist(),
#'rfr__criterion': ['mae'], too slow, see https://stackoverflow.com/questions/57243267/why-is-training-a-random-forest-regressor-with-mae-criterion-so-slow-compared-to
'rfr__max_features': ['auto', 'log2', 'sqrt', None],
'rfr__max_depth': [5, 10, 15, 20, 50, 100, None]
}
parameters2 = {
'knn__n_neighbors': [3, 7, 10, 15, 20, 50, 100, 200, 500],
'knn__weights': ['uniform', 'distance'],
'knn__p': [1, 2]
}
pars = [parameters1, parameters2]#, parameters3, parameters4]
pips = [pipeline1, pipeline2]#, pipeline3, pipeline4]
print("Starting Gridsearch")
for i in range(len(pars)):
gs = GridSearchCV(pips[i], pars[i], verbose=2, scoring='neg_mean_absolute_error', n_jobs=-1)#, return_train_score=True)
gs.fit(X_tr_rescaled, y_tr)
print ("MAE score", gs.best_score_ , "with parameters",gs.best_params_)
# Save model and its performance on train/test sets
gs_results.append({
'model': gs.cv_results_,
'best_params': gs.best_params_,
'train_mae': gs.best_score_,
'test_mae': gs.score(X_te_rescaled, y_te),
})
return pd.DataFrame(gs_results)
gs=grid_search(X_tr_rescaled, y_tr, X_te_rescaled, y_te)
Starting Gridsearch
Fitting 5 folds for each of 224 candidates, totalling 1120 fits
MAE score -4.292978032234014 with parameters {'rfr__max_depth': None, 'rfr__max_features': 'log2', 'rfr__n_estimators': 500}
Fitting 5 folds for each of 36 candidates, totalling 180 fits
MAE score -3.186669537586505 with parameters {'knn__n_neighbors': 100, 'knn__p': 2, 'knn__weights': 'distance'}
from tensorflow.keras import regularizers
def build_model(number_of_hidden_layers=1, number_of_neurons=2):#,l2_penalty=0):
model = Sequential()
# First hidden layer
model.add(Dense(number_of_neurons, kernel_initializer='normal', input_dim = X_tr_rescaled.shape[1], activation='relu')) #, kernel_regularizer = regularizers.l2(l2_penalty)))
# hidden layers
for hidden_layer_number in range(1, number_of_hidden_layers):
model.add(Dense(number_of_neurons, kernel_initializer='normal', activation='relu'))
# output layer
model.add(Dense(1, kernel_initializer='normal',activation='linear'))
model.compile(optimizer='adam', loss='mean_absolute_error')
return model
tuned_model = KerasRegressor(build_fn=build_model)
params = {
'number_of_hidden_layers': [2, 3, 4, 5, 10, 15, 20], #Deeper Network Topology
'number_of_neurons': [16, 32, 64, 128] #Wider Network Topology
#'l2_penalty': np.logspace(-4, -1, num=5) #array([0.0001 , 0.00056234, 0.00316228, 0.01778279, 0.1 ])
}
# Create a randomize search cross validation object, to find the best hyperparameters it will use a KFold cross validation with 4 splits
random_search = RandomizedSearchCV(tuned_model, param_distributions = params, cv = KFold(4), n_jobs=2, scoring="neg_mean_absolute_error", n_iter=8)
#random_search = GridSearchCV(tuned_model, params, cv = KFold(4))
# find the best parameters!
random_search.fit(X_tr_rescaled, y_tr)
random_search.best_estimator_.get_params()
C:\Users\Thinkpad\AppData\Local\Temp/ipykernel_14764/433008388.py:20: DeprecationWarning: KerasRegressor is deprecated, use Sci-Keras (https://github.com/adriangb/scikeras) instead. See https://www.adriangb.com/scikeras/stable/migration.html for help migrating. tuned_model = KerasRegressor(build_fn=build_model)
1758/1758 [==============================] - 10s 5ms/step - loss: 12.3668
{'number_of_neurons': 128,
'number_of_hidden_layers': 5,
'build_fn': <function __main__.build_model(number_of_hidden_layers=1, number_of_neurons=2)>}
It was found that the best combination of hyperparameters is:
selected_model=features_grade_model
X_tr_rescaled, X_te_rescaled, y_tr, y_te, scaler = splitTrainTest(clean_df,target,selected_model)
#grid_search(X_tr_rescaled, y_tr, X_te_rescaled, y_te)
#{'knn__n_neighbors': 10, 'knn__p': 2, 'knn__weights': 'distance'}
n_neighbors=200
p=1
weights='distance'
neigh = KNeighborsRegressor(n_neighbors=n_neighbors, p=p, weights=weights)
neigh.fit(X_tr_rescaled, y_tr)
kNNResults=saveModelResults(neigh, "KNN", X_te_rescaled, y_te)
MAE with best alpha: 3.367%
allModels=[kNNResults, ridge_grade ]
for i in range(0, len(selected_model)):
plt.figure(figsize=(12,8))
plt.title('ML comparison for '+selected_model[i])
plt.xlabel(selected_model[i])
plt.ylabel(target)
x = scaler.inverse_transform(X_te_rescaled)[:,i]
plt.scatter(rand_jitter(x, 0, selected_model[i]), y_te, label="Test set", alpha=.5)
for idx,model in enumerate(allModels):
delta = (idx+1)/(len(allModels)*4)
plt.scatter(rand_jitter(x, delta, selected_model[i]), model[1].predict(X_te_rescaled), label=model[2],alpha=.5)
plt.legend()
plt.show()